I am using this code:
$.getJSON(url, function(data) {
console.log(data);
}, "json");
Now, nothing gets logged in the console but i can see the response in the network tab of Chrome. Is there any reason for this? Is the callback wrong?
Get rid of the
, "json"at the end. Otherwise,"json"would be the callback function.Instead of
getJSONyou could use