我有一个 json 数组,其中有一个子数组,格式如下:
[{"id":"188","stars":"2","staryes":"2","starers [{"starfirstname":"Name1","starlastname":"Name1","staruser":"1"},
{"starfirstname":"Name2","starlastname":"Name2 ","staruser":"3"}],"time":"1364151043","postedby":"43","text":"TEST","firstname":"Name3","lastname":"Name3","picture":"806243.jpg"}]
我可以通过这样做在整个数组上运行一个循环:
$.each(data, function(i, data) { //function })
但我不知道如何让循环在子数组“starers”上运行
这样做的最佳方法是什么?