So I have this:
{"d":[{"__type":"Like","Id":345,"Sender":"JohnSmith","SourceId":338,"DateTime":"\/Date(1321057654000)\/","FromStream":true}]}
And this:
function LikesSuccess(result, userContext, methodName) {
for (var key in result) {
alert(key.Sender);
}
}
JSON returns an array of type “Like” with the properties shown above.
Is there another way of getting “JohnSmith” from Sender? Because this returns undefined.
Thanks.
Try
because your JSON object has the key
d. >> jsfiddle