Convert json data to javascript array - in multi-dimensional sense
- by AW-GWTF899
I have a json array say
{
"People": {
"Person": [
{"FirstName": "John", "LastName": "Smith"}
{"FirstName": "Joe", "LastName": "Bloggs"}
{"FirstName": "Wendy", "LastName": "Deng"}
]
}
}
And I want to convert this into a javascript array (something like this)
var persons = [ ["FirstName", "John", "LastName", "Smith"], ["FirstName", "Joe", "LastName", "Bloggs"], ["FirstName", "Wendy", "LastName": "Deng"] ];
How do I accomplish this? Hope my question makes sense and I realise the javascript array initialization may not be the correct way to put it.
Thanks.