I have a function (that I can't change) that queries data from a database and returns it in a variable that shows as the following format if I display it as text:
var outputdata=
[
{ itemA: 'M0929', itemDate: new Date(1950,03-1,25,0,0,0,0), itemID: 'JDR12' },
{ itemA: 'X0121', itemDate: new Date(1983,07-1,07,8,0,0,0), itemID: 'RPN50' },
{ itemA: 'U0229', itemDate: new Date(1942,09-1,07,8,0,0,0), itemID: 'CRG98' },
];
I need it to be converted into the following format (specific date formatting doesn't matter) for use by another function (that I also can't change).
var inputdata=[
[
"M0929",
"1950-03-25",
"JDR12"
],
[
"X0121",
"1983-07-07",
"RPN50"
],
[
"U0229",
"1942-09-07",
"CRG98"
]
];
Could someone offer some assistance... I don't really understand javascript arrays and I'm really after a function to do the conversion.