good afternoon. I'm developing an app that can get a JSON from local (manifest.json). I want to get this file from JavaScript and then read it. But I have a problem, I cant call this file. How can I?
var urlJSON = new XMLHttpRequest("manifes.json").toString;
var dataJSON = JSON.parse(urlJSON);
alert(dataJSON.name);
console.log(urlJSON)to see what actually contains this variable.var urlJSON = new XMLHttpRequest("manifest.json").toString;XMLHttpRequest, Using XMLHttpRequest. Also what do you mean by "local"? The user's hard drive? That cannot be done, without the user selecting it through some process like a file input