I have a collection with documents that have a userIds
attribute containing an array of string values. I want to list these documents by excluding the ones that contain a certain userId in this array.
I need a notContains
which seems to not exist. Is there a workaround for this?
TL;DR
Developers seek to filter documents by excluding those containing a specific userId in an array attribute. They are looking for a `notContains` query, which is not available. A workaround for this is to use the `$not` operator in combination with the `$in` operator to achieve the desired exclusion.