Getting back the activated or condition mongodb

Viewed 8

For example I have an OR array with condition in mongodb:

db.getColection('abc').find({ $or: [{x: 1},{y:2}]})

Is there any way to find out which of these conditions was triggered while getting back the document ?

One solution is using client side code to perform further filtering, but any other way that is native to the database?

0 Answers
Related