I have an array like that :
[{
"id": 1,
"city": [{
"name": "BERLIN",
}
],
}, {
"id": 2,
"city": [{
"name": "PARIS",
}
],
}, {
"id": 3,
"city": [{
"name": "LONDON",
}, {
"name": "EXETER",
}
],
}
And I would like extract the values below :
[
{id: 1, city: {name: "BERLIN"},
{id: 2, city: {name: "PARIS"},
{id: 3, city: {name: "LONDON"},
{id: 3, city: {name: "EXETER"}
]
I tried with and two map but, I don't have the result expected.
Can you help me for this issue.
Thank you.