I have a JSON Object that looks like this that I created with a java hashmap.
{"1":895,"2":827,"3":1429,"4":14,"5":1,"6":2,"10":2}
My question can go either way is there any way to either convert this JSON object to an associative js array such as
{
d:[
{
'Month' : 1,
'Count' : 895
}
{
'Month' : 2,
'Count' : 827
}
{
'Month' : 3,
'Count' : 1429
}
{
'Month' : 4,
'Count' : 14
}
{
'Month' : 5,
'Count' : 1
}
{
'Month' : 6,
'Count' : 2
}
{
'Month' : 10,
'Count' : 2
}
]
}
or otherwise convert it into a java script 2d array such as
newArray = [[1, 895][2,827][3,1429][4,14][5,1][6,2][10,2]];
I have researched and researched and I keep running across a lot of great things but none particularly for this instance. Any help would be great!