Which the best way to convert this array object:
a = [
{"id" : 1, "name": "a"},
{"id" : 2, "name": "b"},
{"id" : 3, "name": "c"}
]
to:
b = [
[1, "a"],
[2, "b"],
[3, "c"]
]
map each element using Object.values.
const a = [
{"id" : 1, "name": "a"},
{"id" : 2, "name": "b"},
{"id" : 3, "name": "c"},
]
const b = a.map(Object.values);
console.log(b);