Have you converted your data from string to JavaScript object?
You can do it with data = eval('(' + string_data + ')');
or, which is safer, data = JSON.parse(string_data);
but later will only works in FF 3.5 or if you include json2.js
jQuery since 1.4.1 also have function for that, $.parseJSON()
.
But actually, $.getJSON()
should give you already parsed json object, so you should just check everything thoroughly, there is little mistake buried somewhere, like you might have forgotten to quote something in json, or one of the brackets is missing.