jquery - display data using Ajax -
i want display data in value field of dictionary using ajax. know format display, stuck in displaying 1 of fields. code here :
$.each(result, function(index, element) { alert(element.place); alert(element.unique name); });
element.unique name
doesn't work there space in between( unique name not uniquename). guys me out displaying this?
var data = { "employees": [{ "firstname": "john", "unique name": "doe" }, { "firstname": "anna", "unique name": "smith" }, { "firstname": "peter", "unique name": "jones" }] }; $.each(data, function (index, element) { alert(index); $.each(element, function (inde, data1) { alert(inde); alert(data1.firstname); alert(data1['unique name']); }); });
i think may meet requirements. plz let me know if works.
Comments
Post a Comment