Here is some API data retrieved from a website...
date: (...)
dateTimeGMT: (...)
matchStarted: (...)
squad: (...)
team-1: (...)
team-2: (...)
toss_winner_team: (...)
type: (...)
unique_id: (...)
winner_team: (...)
When I use console.log(response.date)
or
console.log(response.toss_winner_team)
, the code works correctly. However, if I use console.log(response.team-1)
or console.log(response.team-2)
, it returns NaN
.
You can view the API data in the image provided below: