Well, turns out camp_amount wasn't setup properly and returned "NaN"... Thanks anyway! You guys made me look past the array syntax, which turns out to be fine. Sometimes I just get a bit lost in code.
For use with highcharts I have the following array:
dashboardData = [[tableData[1], parseFloat(tableData[12])],[tableData[14], parseFloat(tableData[25])]];
I can literally just paste that as highcharts series data:
data: dashboardData
However, I need to build the array in a for loop because the length of the array will vary. So I need to build an array that ends up with the same structure as above, which would be something like:
0: Array[2]
0: "a string"
1: 312
1: Array[2]
0: "another string"
1: 1668
How do I build this up? I tried the following but it doesn't work...
var dashboardData = [];
for (var i = 1; i <= camp_amount.length; i++) {
dashboardData.push([tableData[i], tableData[i + 1]]);
}