Hi I am trying to read in a .json file from my local machine. it will not read it in the code I am using is:
jQuery.getJSON('../json/test.json')
.done(function(data) {
var test = data;
alert("sucsess");
})
.fail(function(data){
alert("failed");
});
All I am getting from this is failed what am I doing wrong. I am not going through a server with this.
Use the File APIs. Here’s a guide with sample code and demos: