I have an ajax call which returns the category list. I wish to extract each name from the list. my ajax looks like :
$(document).ready(function () {
$.ajax({
type: "GET",
url: "/Client/GetCategoryList",
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function (data) {
alert(data);
},
error: function () { alert("Error"); }
});
});
if i am using "dataType: "json"," then in the alert i found the result like
[object Object],[object Object],[object Object],[object Object],[object Object]
and if i comment the "dataType: "json" then the result is like
[{"iID":56,"strName":"as","strDescription":"as","strImage":""},{"iID":24,"strName":"laptop","strDescription":"laptops","strImage":"uploads/2dell.jpg"}, {"iID":14,"strName":"mobile","strDescription":"handsets","strImage":"uploads/14sams.jpeg"},{"iID":46,"strName":"sds","strDescription":"dsd","strImage":"uploads/Category/46bg.jpg"}]
I just wanted to extract the category name or strName from the data as a hyperlink . Any help will be highly appreciable.Thanks in advance.
strNameproperty of each.