I have a array of json like the one I have given below
[
{"Name": {"xxx": [{"I": "FORENAME"} , {"I": "Surname"}]}},
{"EmailAddress":{"I": "yyy"}},
{"[ID]": {"I": "zzz"}},
{"[Company]": {"I": "aaa"}}
]
this has to be converted like
[
["Name", ["xxx", [["I", "FORENAME"], ["I", "Surname"]]]],
["EmailAddress", ["I", "yyy"]],
["[ID]", ["I", "zzz"]],
["[Company]", ["I", "aaa"]]
]
i am able to convert single dimension json to array using the map function
$.map( dimensions, function( value, index ) {
ary.push([index, value])
});
but converting it to work with multiple dimension is difficult. Is there any methods to convert json like this or any work around..?