I am trying to parse the JSON result from an Ajax call to a .NET web service, for example:
function doAjaxCallBack() {
$.ajax({
type: "POST",
url: "AjaxCallBackService.asmx/GetAllTitles",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (msg) {
},
});
}
Here is the JSON result I returned from doAjaxCallBack:
{"d":[
{
"__type":"ASP.NET_Training.Book",
"Price":12.3,
"Title":"Javascript Programming",
"Tag":["Ajax","Javascript"]
},
{
"__type":"ASP.NET_Training.Book",
"Price":14.23,
"Title":"Code Complete",
"Tag":["Programming","Concept"]
}
]}
I want to get the title of the book and its tags. How do I iterate over this JSON?
Thank.
source
share