I have a Json array as mention below
var data= " [{"-1":0,"0":0,"1":0,"2":1,"3":0,"4":0,"5":1,"Total":2},{"-1":0,"0":0,"1":0,"2":0,"3":0,"4":0,"5":0,"Total":0},{"-1":0,"0":0,"1":0,"2":1,"3":0,"4":0,"5":1,"Total":2},{"-1":0,"0":0,"1":0,"2":1,"3":0,"4":0,"5":1,"Total":2}]";
When I do
JSON.Parse(data);
the order is original order is missing, it shows as below
0: {0: 0, 1: 0, 2: 1, 3: 0, 4: 0, 5: 1, -1: 0, Total: 2}
1: {0: 0, 1: 0, 2: 0, 3: 0, 4: 0, 5: 0, -1: 0, Total: 0}
2: {0: 0, 1: 0, 2: 1, 3: 0, 4: 0, 5: 1, -1: 0, Total: 2}
3: {0: 0, 1: 0, 2: 1, 3: 0, 4: 0, 5: 1, -1: 0, Total: 2}
Is there any way we can preserve the order of the parsed arry ?