2020-12-17

MongoDB - Filter based on sibling fields (2 fields in the same document)

db.COLLECTION.aggregate([   

    {$match: { 

        $expr: {

            $eq: ["$field1", "$field2.subfield3"]

        }

    }}

]);


No comments:

Post a Comment