I am trying to call a certain portion of an API JSON and am having a brain fart that is kicking my ass. In the below data:
[
{
"matchId": "3740578690442",
"timestamp": 1652070817,
"timeAgo": {
"number": 14,
"unit": "days"
},
"clubs": {
"60056": {
"clubDivision": "10",
"cNhlOnlineGameType": "200",
"garaw": "3",
"gfraw": "4",
"losses": "0",
"memberString": "2 / 2",
"opponentClubId": "196556",
"opponentScore": "3",
"opponentTeamArtAbbr": "DROP",
"passa": "71",
"passc": "50",
"ppg": "0",
"ppo": "0",
"result": "1",
"score": "4",
"scoreString": "4 - 3",
"shots": "18",
"teamArtAbbr": "EASHL",
"teamSide": "0",
"toa": "340",
"winnerByDnf": "0",
"winnerByGoalieDnf": "0",
"details": {
"name": "Flint Tropicals",
"clubId": 60056,
"regionId": 6,
"teamId": 5223,
"customKit": {
"isCustomTeam": "1",
"crestAssetId": "76",
"useBaseAsset": "1"
}
},
"goals": "4",
"goalsAgainst": "3"
},
"196556": {
"clubDivision": "10",
"cNhlOnlineGameType": "200",
"garaw": "4",
"gfraw": "3",
"losses": "1",
"memberString": "2 / 2",
"opponentClubId": "60056",
"opponentScore": "4",
"opponentTeamArtAbbr": "EASHL",
"passa": "51",
"passc": "38",
"ppg": "0",
"ppo": "0",
"result": "2",
"score": "3",
"scoreString": "3 - 4",
"shots": "20",
"teamArtAbbr": "DROP",
"teamSide": "1",
"toa": "355",
"winnerByDnf": "0",
"winnerByGoalieDnf": "0",
"details": {
"name": "Beeline Cafe",
"clubId": 196556,
"regionId": 8,
"teamId": 5136,
"customKit": {
"isCustomTeam": "1",
"crestAssetId": "232",
"useBaseAsset": "1"
}
},
"goals": "3",
"goalsAgainst": "4"
}
}
Under "Clubs" it lists the team id as the key. I would like to assign a variable to that key essentially so that $teamid = $clubs['######']. Any help is greatly appreciated, I spent all weekend trying to get this and I can not get it to work.