I have used getSON() successfully before but I am meeting with an issue which I don't seem to get a hold on. The data object returned is not populated correctly by getJSON(). Am I doing something wrong?
The data I am getting back has this kind of JSON structure:
{"Rows":
[ { "id": "3", "name": "Ron" },
{ "id": "5", "name": "Liz" }
]
}
And, I have tested the WS call directly to see the raw JSON stream. It is correct. So, there's nothing wrong with the server code that I know of.
The test code I am using in the front-end is this:
$.getJSON(
"http://blah.com/SomeRsrc/abc",
function(data) {
var ObjList = "";
for (var name in data) ObjList += name + "\n";
alert(ObjList);
}
);
I got this in the alert pop-up
"Rows" (without the double-quote)
Any ideas what happened to the rest of the data? Can getJSON handle this type of JSON?