I have a javascript object and when I JSON.stringify it, it looks like following
[
{
"item_id": null,
"parent_id": "none",
"depth": 0,
"left": "1",
"right": 4
},
{
"item_id": "1",
"parent_id": null,
"depth": 1,
"left": 2,
"right": 3
}
]
I want to convert it to a multi-dimensional array which looks like the following
item[0][0] = item_id
item[0][1] = parent_id
item[0][2] = depth
item[0][3] = left
item[0][4] = right
item[1][0] = item_id
item[1][1] = parent_id
item[1][2] = depth
item[1][3] = left
item[1][4] = right
Any help will be much appreciated :)
Edit : Got it working with the help of all :) Thanks everybody for the help.