Try this:
$(document).ready(function (){
$.getJSON('myurl.com/myFile.json',function(result){
alert(result);
});
});
- It should be
$(document).readynot$(document).read - Remove the extra
aafter the alert. - Remove the extra bracket after the url
'myurl.com/myFile.json')<– This one - Please have a look at the jQuery API before starting something new.
2
solved Cannot access json with getJson function