I am looking to transform the object structure below:
[
{
"tahun": "2010",
"apel": 100,
"pisang": 200,
"anggur": 300,
"nanas": 400,
"melon": 500
},
{
"tahun": "2011",
"apel": 145,
"pisang": 167,
"anggur": 210,
"nanas": 110,
"melon": 78
}
[
into this array structure for my highchart in Django,
[
["2010",100],
["2010",200],
["2010",300],
["2010",400],
["2010",500],
["2011",145],
["2011",167],
["2011",210],
["2011",110],
["2011",78]
]
Any suggestions on achieving this transformation, perhaps using AJAX?