I would like to know how I can transform an Object Array into a Simple Array only with a certain value.
I have this:
const names = [
{id:0, name:"Jean"},
{id:2, name:"Ricardo"},
{id:4, name:"Letiiicia"},
{id:5, name:"Dai"},
{id:7, name:"Tamy"},
{id:10, name:"Abeu"},
I wanted to return this to:
const names /*ou um novo array, não sei*/ = ['Jean','Ricardo','Leticia','Dai','Tamy','Abeu']
A new array
only with names
. Could someone help me?