Mongoose.find() How to query document with property greater than some number OR value is null OR property doesnt exist? Mongoose.find() How to query document with property greater than some number OR value is null OR property doesnt exist? mongoose mongoose

Mongoose.find() How to query document with property greater than some number OR value is null OR property doesnt exist?


Try $or condition,

db.collection.find({  $or: [    { age: { $gt: 13, $lt: 27 } },    { age: null },    { age: { $exists: false } }  ]})

Playground