How can I map through the compositions array (in the sample object), and populate the compositions array of the objToAdd object with the data.
const sample = {
links: {
"compositions": [
{
"modelId": 103889,
"id": 164703
},
{
"modelId": 103888,
"id": 164704
}
]
}
}
const objToAdd = {
compositions: []
};