I am invoking a ASP.Net web-service (.asmx) using j-query and my response is a json array as follows
my jquery code is:
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
dataType: "json",
url: "http://localhost:1000/WebSite2/Service.asmx/HelloWorld",
data: '{}',
success: function(msg) {
alert(msg.d);
},
error: function() {
alert("Error");
}
});
my response is:
[
{
"id":1,
"name":"a",
"place":"b"
},
{
"id":2,
"name":"c",
"place":"d"
},
{
"id":3,
"name":"e",
"place":"f"
}
]
I want to add each objects in array to a list using j-query .I have tried a lot of ways but failed can anyone help me