0
如何循環瀏覽此json數據而不用數字引用數據項。我想用它作爲關聯數組。我有這個至今:通過JSON數據循環關聯
$.post('/controlpanel/search', { type: type, string: string }, function(data){
$.each(data, function() {
$.each(this, function(index, itemData) {
//alert(data.id) something like this
//currently returns undefined
});
});
}, 'json');
例的Json代碼:所有的任何幫助
[{"id":"1","title":"","link":"http:\/\/www.msn.com","date_added":"0000-00-00 00:00:00",
"privacy_type":"0","user_id":"8","field2":"","field3":"","bookmark_id":"70","tag":"clean"}]
感謝
上帝該死!謝謝你的工作。 :) – Abs 2010-04-01 22:48:01
@Abs - 歡迎:) – 2010-04-01 22:49:07