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);  )}; 

link jsfiddle

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

Popular posts from this blog

php - Permission denied. Laravel linux server -

google bigquery - Delta between query execution time and Java query call to finish -

python - Pandas two dataframes multiplication? -