我的json结果如下:
{"Result":"OK","Records":[{"impTxnId":12231,"forecastedId":26518},
{"impTxnId":12231,"forecastedId":26519}]}
如何迭代记录?我想要impTxnId
和forecastedId
价值观。
代码:
$(function(){
var request = $.ajax({
url: '<%=getMatchedTransactionsURL%>',
type : "post",
});
request.done(function (data) {
alert(data); // This displays the data.
$.each(data.Records, function(i, record) {
alert(record.impTxnId + " " + record.forecastedId);
});
});
});