how to read returned data format
Like on the following code:
$('#<%= txtSearch.ClientID %>').autocomplete({
source: function (request, response) {
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: "WebService.asmx/GetAutoCompleteData",
data: "{'kwrds':'" + $("#txtSearch").val() + "'}",
dataType: "json",
success: function (data) {
response(data.d);
alert("message: " + data.toString());
},
error: function (result) {
alert(result);
}
});
}
});
}
Webmethod returns data, but I didn't know it returns the data in the following format d: ["first":"test", "last":test2]
My question is how to know, generally, the returned format of json data to avoid this confusion? Like d:[] or mydata:[] Or how to show the returned value through the web browser or any helping tools.