I'm trying to get data into an array. The current temp array looks like this:
tmp[0][0] = "NY"
tmp[0][1] = "52"
tmp[1][0] = "FL"
tmp[1][1] = "25"
What i'm trying to do is push the data into a new array named data. The final structure for data should look like this:
data = [
{ label: "NY", data: 52},
{ label: "FL", data: 25},
]];
I can't seem to get that going. Here's what i tried:
for(var i = 0; i < tmp.length; i++) {
data<%=r1%>.push([label: tmp[i][0], data: tmp[i][1]]);
}
all i'm hitting is brick walls and my brain hurts. Any ideas?