既に「sort_id」でソートされているサーバーから JSON 応答を取得しています。
応答テキスト ==>
{
"status": 1,
"complete": 1,
"list": {
"178432351": {
"item_id": "178432351",
"sort_id": 0,
},
"203720680": {
"item_id": "203720680",
"sort_id": 1,
},
"286082053": {
"item_id": "286082053",
"sort_id": 2,
},
"284062632": {
"item_id": "284062632",
"sort_id": 3,
},
"16137955": {
"item_id": "16137955",
"sort_id": 4
}
},
"since": 1359248876
}
var response = JSON.parse(request.responseText);
JSON.parseでオブジェクトに解析したら、各アイテムのデータを次の方法で出力してみます
for(item in response)
印刷されるデータは完全に順不同です。sort_id 順で「for in」ループを使用する方法はありますか? または、受信したデータをそのように印刷する他の方法。