I am trying to parse this json data
[
{ "title":"Yorkshire 199/8 * v Durham 237/10",
"link":"http://www.cricinfo.com/ci/engine/match/693421.html?CMP=OTC-RSS",
"description":"Yorkshire 199/8 * v Durham 237/10",
"guid":"http://www.cricinfo.com/ci/engine/match/693421.html"},
{
"title":"Essex v Warwickshire 271/7 *",
"link":"http://www.cricinfo.com/ci/engine/match/693423.html?CMP=OTC-RSS",
"description":"Essex v Warwickshire 271/7 *",
"guid":"http://www.cricinfo.com/ci/engine/match/693423.html"},
{
"title":"Singapore v Malaysia",
"link":"http://www.cricinfo.com/ci/engine/match/774365.html?CMP=OTC-RSS",
"description":"Singapore v Malaysia",
"guid":"http://www.cricinfo.com/ci/engine/match/774365.html"}
]
returning from server side method and using this method to iterate through each item
$.ajax({
type: "POST",
url: "Default.aspx/ServerSideMethod",
//data: JSON.stringify({ 'p': 'Sent Text' }),
contentType: "application/json; charset=utf-8",
dataType: "json",
async: true,
cache: false,
success: function (data) {
//alert(data.d) //returns the result set displayed above.
$.each(data, function (i, obj) {
alert(obj.title); // returns undefined.
});
},
error: function (x, e) { alert(x.responseText); }
})
but it always return undefined. Is there any issue with my jquery function or with data? My server side function is working fine and the above Jquery function also show the returned values but I am unable to parse this value.
I also tried this thread to fix this issue but nothing succeeds. Any one please...