I have a set of data in one JSON structure:
[[task1, 10, 99],
[task2, 10, 99],
[task3, 10, 99],
[task1, 11, 99],
[task2, 11, 99],
[task3, 11, 99]]
and need to convert it to another JSON structure:
[{
label: "task1",
data: [[10, 99], [11, 99]]
},
{
label: "task2",
data: [[10, 99], [11, 99]]
},
{
label: "task3",
data: [[10, 99], [11, 99]]
}]
What's the best way to do this with javascript/java?