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"
using the following functions.
_Chart._accessors = {
`"team": function(data) { return data[0]; },`
`"current": function(data) { return data[0]; }`
};
When I check the console log team, and current return arrays of two items which is logical.
My question is how do I access the data inside those arrays?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…