I need check if a objects array contains all elements of array, this is my objects array:
let array1 = [
{id: 123, name: "Name of item"},
{id: 456, name: "Other name"}
]
This is my array to find all the elements in the array1:
let array2 = [123, 456]
I want to know if all elements of array2
are in array1
in id property.