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