I have the following collection in the DB:
[123, 1]
[123, 3]
[456, 1]
[456, 2]
[456, 3]
And I have an array:
[123, 2]
[456, 4]
[456, 2]
I want to check what items in the array are in the DB. Using this example, the result should be:
[456, 2]
Is there any way to do this in Mongodb in bulk, meaning only 1 query instead of looping?
Thanks in advance.