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]]
First you need to parse the JSON to get real objects.
With JavaScript you can just eval()
it, or use JSON.parse()
. There is a JSON implementation at JSON.org for browsers that don't have this built in.
For Java (an entirely different language), JSON.org also has an implementation of a JSON parser that you can use.
Once you've got the objects out of it, you can then just re-arrange until your heart's content, then JSON.stringify()
(in JS) to convert back to JSON.