i am trying to add data to an array where part of the array name is a variable.
if that makes sense?
this is my coding, i think its something to do with the ["charts"[d]] part but nothing is being added to the arrays
var
charts0 = [],
charts1 = [],
charts2 = [],
charts3 = []
var newdata = data.split("|");
var newdates = dates.split(",");
for (i = 0; i < newdates.length; i++) {
for (d = 0; d < newdata.length; d++) {
var dataparts = newdata[d].split(",");
["charts"[d]].push({x: newdates[i], y: dataparts[i+1]});
}
}