I want to get things with collectionId that match those in the list.
In other words, I want to get the desired result. How can I do it?? please help me....
const music_list = {
"resultCount": 50,
"results": [{
"collectionId": 123,
"ArtistId": "BLACKPINK"
},
{
"collectionId": 456,
"ArtistId": "BTS"
},
{
"collectionId": 789,
"ArtistId": "CARDIBI"
}
]
}
const list = [123, 142, 118];
In this situation, Desired result = [{"collectionId":123, "ArtistId": "BLACKPINK"}]