Suppose I make a request in Mongodb, like this
db.user.find({$or : [{"field1" : "abc"}, {"field2" : "def"}, {"field3" : "ghi"}]})
And a number of documents are returned. What is the easiest way to find out which of (or several) of the three filters corresponds to each returned document? "The easiest", I do not want to add more find () executions.
Thank.
filter find mongodb match
Eric Chen Jul 08 2018-11-22T00: 00Z
source share