Looking to transform a JSON object into an array format, like so:
[ { "name": "Batting" ,"data": [10,20,30,40]} , { "name": "Bowling" ,"data": [10,30,50,70] },{ "name": "Fielding" ,"data": [20,40,50,70]}]
While I can create JSON objects for each index, I'm struggling with how to put them into a JSON array.
for(var abc in objJSON.yAxis)
{
seriesValues += JSON.stringify({name:abc,data:(objJSON.yAxis)[abc]});
}
Any suggestions on how to achieve this?