0

I am trying to access data from a api but the problem is that it has a numeric property name. This is how i access the data:

working:

data[i].price_usd 

Not Working:

data[i].24h_volume_usd

I have tried this solution but cant get it to work.

And also tried:

var twentyfour_volume_usd = "24h_volume_usd"; data[i].twentyfour_volume_usd

user3483203
  • 50,081
  • 9
  • 65
  • 94
PEPEGA
  • 2,214
  • 20
  • 37

1 Answers1

1

You should use data[i]['24h_volume_usd'].

Alf
  • 1,414
  • 1
  • 15
  • 27