好嵌套的數組,這樣的標題可能有點誤導,但我不太清楚我所描述的,所以這裏去。循環執行下面的鍵
我有以下的JSON:
{
"lastModified": 1368517749000,
"name": "Requiem Paradisum",
"realm": "Chamber of Aspects",
"battlegroup": "Misery",
"level": 25,
"side": 1,
"achievementPoints": 1710,
"emblem": {
"icon": 126,
"iconColor": "ffdfa55a",
"border": 3,
"borderColor": "ff0f1415",
"backgroundColor": "ff232323"
},
"news": [
{
"type": "itemPurchase",
"character": "Osmoses",
"timestamp": 1368482100000,
"itemId": 91781
},
{
"type": "itemLoot",
"character": "Greenmean",
"timestamp": 1368477900000,
"itemId": 87209
},
{
"type": "itemLoot",
"character": "Greenmean",
"timestamp": 1368475800000,
"itemId": 86880
},
{
"type": "itemPurchase",
"character": "Osmoses",
"timestamp": 1368475380000,
"itemId": 91781
},
{
"type": "itemPurchase",
"character": "Osmoses",
"timestamp": 1368475380000,
"itemId": 91779
},
{
"type": "itemPurchase",
"character": "Osmoses",
"timestamp": 1368475320000,
"itemId": 91779
},
{
"type": "playerAchievement",
"character": "Osmoses",
"timestamp": 1368470700000,
"achievement": {
"id": 6193,
"title": "Level 90",
"points": 10,
"description": "Reach level 90.",
"rewardItems": [
{
"id": 87764,
"name": "Serpent's Heart Firework",
"icon": "inv_misc_missilelarge_green",
"quality": 1,
"itemLevel": 1,
"tooltipParams": {
},
"stats": [
],
"armor": 0
}
],
"icon": "achievement_level_90",
"criteria": [
],
"accountWide": false,
"factionId": 2
}
},
基本上我需要循環一切都在「新聞」和輸出。 我想不出什麼如何正確分析: 答:不指定琴鍵號和 B:當它到達一個關鍵是將包含那些鍵我在虧損下的其他密鑰,並進一步陣列。 (例如「玩家成就」鍵) 我明白我可能是有點新手在這裏和可能很可能是第1頁的「PHP傻瓜」上,但我發誓,我是一派死!
這是完整的JSON? – alwaysLearn 2013-05-14 10:52:34
從第一個6鍵左右的開始,它會繼續進行另外70個參賽作品,這些參賽作品是我引用的參賽作品的混合作品。 – 2013-05-14 10:56:45