API-FOOTBALL

FREEMIUM
Verified
By API-SPORTS | Updated 4日前 | Sports
Popularity

10 / 10

Latency

356ms

Service Level

99%

Health Check

N/A

Back to All Discussions

leagueTable endpoint returns nested array

Rapid account: Choxxy
Choxxy
5年前

calling this endpoint https://api-football-v1.p.rapidapi.com/v2/leagueTable/88, return json in the format below, why is the array nested?

{
“api”: {
“results”: 1,
“standings”: [
[
{
“rank”: 1,
“team_id”: 727,
“teamName”: “Osasuna”,
“logo”: “https://www.api-football.com/public/teams/727.png”,
“group”: “Segunda División: Regular Season”,
“forme”: “WWDWD”,
“description”: “Promotion”,
“all”: {
“matchsPlayed”: 41,
“win”: 25,
“draw”: 9,
“lose”: 7,
“goalsFor”: 58,
“goalsAgainst”: 35
},
“home”: {
“matchsPlayed”: 20,
“win”: 18,
“draw”: 2,
“lose”: 0,
“goalsFor”: 33,
“goalsAgainst”: 7
},
“away”: {
“matchsPlayed”: 21,
“win”: 7,
“draw”: 7,
“lose”: 7,
“goalsFor”: 25,
“goalsAgainst”: 28
},
“goalsDiff”: 23,
“points”: 84,
“lastUpdate”: “2019-06-04”
},
. . .
]
]
}
}

Rapid account: Choxxy
Choxxy Commented 5年前

Ok, thanks hadn’t noticed that

Rapid account: Api Sports
api-sports Commented 5年前

hi,
This is explained in our documentation, (https://www.api-football.com/documentation#standings), Some competitions have several rankings in a year, group phase, opening ranking, closing ranking etc…

Join in the discussion - add comment below:

Login / Signup to post new comments