After JSON.stringify-ing my JavaScript object, the output looks like this:
[
{
"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 am trying to convert this into a multi-dimensional array that resembles the following structure:
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 assistance on achieving this transformation would be greatly appreciated :)
Edit: With the support of everyone, I have successfully implemented the conversion. Thank you all for your contributions.