I have a sample data object below, and I want to get the expected output data.
I have research and end to these sites but I'm having difficutly to apply it. related-link1 related-link2
Someone knows how to do it in a shortest way as possible? thanks
My sample data:
[
{
id: 1,
username: user_1,
user: {
name: 'Cuppelo'
}
},
{
id: 2,
username: user_2,
user: {
name: 'John'
}
},
{
id: 3,
username: user_3,
user: {
name: 'Jane'
}
}
]
Expected output: ['Cuppelo', 'John', 'Jane']