I have an array like this
let arr = [a,b,c]
and a collection like this
{val:a},{val:b}
I want to know that document with val=c is not in the collection.
I have an array like this
let arr = [a,b,c]
and a collection like this
{val:a},{val:b}
I want to know that document with val=c is not in the collection.
2
Answers
One option is:
See how it works on the playground example
You could use filter, and a findOne for each value like:
Or you could use distinct with a filter: