I am trying to make a list of value.
This is my objects:
var data = [
{
id: 40,
location: 'dhaka',
zip: 3244,
author: {name: 'jhon', age: 45}
},
{
id: 41,
location: 'nyc',
zip: 32444,
author: {name: 'doe', age: 45}
},
{
id: 46,
location: 'london',
zip: 3544,
author: {name: 'austin', age: 45}
},
]
var mylist = data.map(Object.values);
I am trying remove some specific key and do the list.
I am expecting output like these below:
[
[40, dhaka, jhon],
[41, nyc, doe],
[46, london, austin]
]
You may notice, i dont need zip and age value. I am expecting output exactly same as above.
Can anyone help me in this case?