I have some really simple json I need to parse and then run conditional statements on. The json looks like:
thejson(
{"catalog.exists":"0"},"");
And I am trying to parse it with:
$('.clicky').click(function(){
$.ajax({
type: 'GET',
url: 'http://myjsonfile.com',
data: 'req=exists,json',
dataType: 'jsonp',
success: function (results) {
var x= catalog.exists;
$("#results").append(x);
}
});
});
However I just get an error that thejson is not defined.
Thanks in advance for any help. looks like you're trying to call a function thejson({...}); rather then assigning it as a variable: var thejson = {...};