So I have :
list =
{
id: 1,
arr: [
{index : 1 , description: "lol" , author: "Arthur"},
{index : 2 , description: "sdadsa" , author: "Bob"},
{index : 3 , description: "loasd" , author: "Mackenzie"}
]
}
and I want to create an array only with description and author property from the arr array.
I tried var a = {l : list.arr.map(x => {x.description,x.author})}. But all items from the array are undefined .
arrin yourlistis not array, are you sure no typo here?