2020-04-30

MongoDB - How to create a "Not and" filter

db.collection_name.find({
  "other_field": "some_value"

  , "$nor": [{ 
    "$and": [
      {"field_filter_1": "value_1"}
      , {"field_filter_2": "value_2"}
    ]
  }]

});

No comments:

Post a Comment