1
我有以下阿賈克斯你看到下面:AJAX從JSON.stringify(數據)解析
$.ajax({
url: url,
type: 'POST',
dataType: 'json',
data: JSON.stringify(json),
contentType: 'application/json; charset=utf-8',
success: function (Data) {
alert(JSON.stringify(Data));
},
error: error
});
當我做警報(JSON.stringify(數據));它顯示的數據如下所示。數據是我送回的對象。它回到3行4列。我如何迭代stringify中的數據,因爲我需要將其存儲到HTML表格中?
{"Data":[{"Iden":"12","Date":"01/23/2011","City":"Clearwater","State":"FL"},{"Iden":"19","Date":"02/09/2012","City":"Elgin","State":"IL"},{"Iden":"14","Date":"06/22/2010","City":"Newport Beach","State":"CA"}]}
當我嘗試這我得到索引爲0,1,2 ...和元素作爲每個字符....不知道我在做什麼錯... – ASD 2012-06-04 13:47:14