I have this array of objects:
[
{
id: 1,
name: 'test 1'
},
{
id: 2,
name: 'test 2'
},
{
id: 3,
name: 'test 3'
},
{
id: 4,
name: 'test 4'
}
]
I have this array of IDs:
[1, 3]
How can I select all objects whose id property exists in the IDs array?