Answer the question
In order to leave comments, you need to log in
How to select documents from MongoDB that don't match a query?
I have several checkboxes on a page. And when they are all enabled, then in theory all products should be displayed, but this does not happen. You need to invert the query to find out which elements do not pass.
An object like this is passed as a request:
{ "$elemMatch": { $or: a:1 } }
{ "$elemMatch": { $or: a:2 } }
{ "$elemMatch": { $or: a:3 } }
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question