I've got 2 arrays:
array1 contains objects of type object1. object1 has a property id.
array2 contains objects of type object2. object2 has a property object1Id.
I know, that array2 contains objects with ids which always are in array1, but array1 can have more (or equal) objects.
To show it:

So to simplify: array1 has all objects, array2 has new objects. How to get an array with old objects..? I'm trying to do it with predicate, but it feels odd to do a loop and insert each object1Id to the predicate. Is there any other option? How to do it properly?