I'm trying to parse the JSON returned from SocialMention.
Here's an example of what the JSON looks like:
{"title":"Social Mention","count":100,"items":[{"title":"RT @Jason_IIATMS: More Damon-isms that'll make you wanna puke: \"Let's hope the Chinese are right when they say this is the year of the tiger!\"","description":"","link":"http:\/\/twitter.com\/NYBD\/statuses\/9495530392","timestamp":1266876271,"image":null,"embed":null,"user":"NYBD","user_image":"http:\/\/a1.twimg.com\/profile_images\/60347208\/155135_logo_final_normal.jpg","user_link":"http:\/\/twitter.com\/NYBD","user_id":3265448,"source":"twitter","favicon":"http:\/\/twitter.com\/favicon.ico","type":"microblogs","domain":"twitter.com","id":"6111418866093918428"},
I'm using jquery's .getJson, so for instance:
$.getJSON("Home/GetSocialMentionData", function (data) {
$.each(data.items, function (i, item) {
alert(i);
});
});
I'm obviously not doing something right because I never get to the alert(i)
and frequently getting a JavaScript error "Microsoft JScript runtime error: 'length' is null or not an object"
I'm completely new to JSON, and I can't seem to find anything while googling for this.
So my question is, how do I parse the results? Any helpful advice would be great.