I have this object in JavaScript of which the data is from AJAX response:
var data1 = [
{
"id": "ID1",
"name": "John"
},
{
"id": "ID2",
"name": "Mark"
},
];
How do I transform it to something like:
var data2 = [["ID1", "John"],["ID2", "Mark"]];
I need that format for populating the data to existing empty DataTables (row.add()).
Thank you for the help.
Edit: I added "ID1", and "ID2" to data2.