javascript - How to read a remote JSON file with jQuery.getJSON()? -
i'm new javascript , read remote json file getjson()
. reason function returns syntax error unexpected token )
can't figure out wrong.
this do, am'i missing ?
var url = "http://mysafeinfo.com/api/data?list=englishmonarchs&format=json"; $.getjson(url, function (json) { console.log(json); alert(json); )};
you have javascript error
var url = "http://mysafeinfo.com/api/data?list=englishmonarchs&format=json"; $.getjson(url, function (json) { console.log(json); alert(json); }); // here swapped bracets
Comments
Post a Comment