mongodb filter or code example
Example 1: find with $or in mongobd
db.inventory.find( { $or: [ { quantity: { $lt: 20 } }, { price: 10 } ] } )
Example 2: mongodb filter include all other fields
use $addFields instead of $project
db.inventory.find( { $or: [ { quantity: { $lt: 20 } }, { price: 10 } ] } )
use $addFields instead of $project