How Do I Access A 2d Array In Javascript, Or D3.js
I want to access the data in the second array from the following code: var data = [ ['Team 1', 3], ['Team 2', 6], ['Team 3', 9]]; I am trying to access the 'team' and 'team number
Solution 1:
The same way as you access the data in the outside of them.
Stick [index]
on the end of the thing you use to access them.
data[0][0]// for example
Chart._accessors.team()[0]// for another example
Post a Comment for "How Do I Access A 2d Array In Javascript, Or D3.js"