0
我有一个问题,从JSON如何从JSON值随机ID
检索值我不知道如何检索值[NAME]是ID(这是随机的)
后给予"allplayers": {
"76561197979570214": {
"clan": "FBÏ",
"name": "phr",
"observer_slot": 6,
"team": "T",
},
"76561198156373160": {
"clan": "ZOWIE",
"name": "TOAO",
"observer_slot": 7,
"team": "T",
},
"76561198071702537": {
"clan": "Team Biceps",
"name": "snatchie",
"observer_slot": 8,
"team": "T",
},
},
随着恒定值使用
"map": {
"mode": "competitive",
"name": "de_overpass",
"phase": "live",
"round": 7,
"team_ct": {
"score": 7,
"name": "Team Kinguin",
"flag": "PL",
"timeouts_remaining": 1,
"matches_won_this_series": 0
},
"team_t": {
"score": 0,
"name": "Samsung4Gamers",
"flag": "PL",
"timeouts_remaining": 1,
"matches_won_this_series": 0
},
"num_matches_to_win_series": 0,
"current_spectators": 3,
"souvenirs_last_round": 0,
"souvenirs_total": 0
},
林
data = JSON.parse(msg);
$("#ct_score").text(data.map.team_ct.score);
任何人都可以帮助我吗?谢谢!
将此密钥总是有** **队的字连接到它? –