2022-03-27

MongoDB - Filter when the result of two AND conditions, is NOT true (not -> X and Y)

db.collection_name.find({

    $nor: [

        {$and: [

            {"field1": "value"},

            {"field2.subfield": "value"},

        ]}

    ]

});   

No comments:

Post a Comment