HI all,
I need to read the file in which the data is in JSON format but i need remove the spaces and newlines from the uploaded file.
Please suggest the required.
The following is the code snippet
var r = new FileReader();
r.onload = function(e)
{
var fileContent = e.target.result;
var val=fileContent.replace(/ /g,"");
}
File format
[{"country": "Nepal",
"value": 260
},
{"country": "Bhutan","value": 700}]
Thanks
mano