Answers for "Mongodb Mongoose : Find all docs where field doesn't exists, plus if field exists apply condition"

0

Mongodb Mongoose : Find all docs where field doesn't exists, plus if field exists apply condition

db.stackoverflow.find({
  $or: [
    { howmuch: { $exists:false } },
    { howmuch:5 }
  ]})
Posted by: Guest on May-19-2021

Code answers related to "Mongodb Mongoose : Find all docs where field doesn't exists, plus if field exists apply condition"

Browse Popular Code Answers by Language