I've been trying for some time to read a local JSON file with pure Javascript (no JQuery). I searched the whole Google and Stackoverflow, but it seems that nothing works in my case. I know the JSON.parse, but how do I read the file in the first place on my Javascript?
loadJSON(json){
var savedJSON = JSON.parse(json);
alert(savedJSON[0].name);
}
The main idea is to have a server website to generate a JSON that has the user's saved information, and now I will read the JSON and generate a HTML with that information to use in a Android app, but I'm struggling at reading the JSON. Any idea?