const books = [
{
"name": "John Adventure",
"year": 2021,
"author": "John doe",
},
{
"name": "Marry Adventure",
"year": 2021,
"author": "Marry doe",
},
{
"name": "Steven Adventure",
"year": 2021,
"author": "Steven doe",
}
];
result
{
"status": "success",
"data": {
"books": [
{
"name": "John Adventure",
},
{
"name": "Marry Adventure",
},
{
"name": "Steven Adventure",
}
]
}
}
how to display certain properties in objects, as above? javascript, how to show only name property object in array like that helppp