this is a really simple question so please don't make fun... I have been given a URL of a webservice that will provide me with a JSON object. I wish to use jQuery's getJSON Method, for example...
var myObj = $.getJSON("https://www.myurl/");
However this isn#t working as when I use console.log(myObj.toSource()) I just seem to get a lot af JavaScript written to the console and not my object. I know I can add a callback with this method, should I do something like this:
var thisJsonObj;
$.getJSON("https://www.myurl/", function(result){
thisJsonObj = result;
});
console.log(thisJsonObj.toSource());
This doesn't work either... where am I going wrong? The URL is working and correct.