$and in mongodb code example
Example 1: $in mongodb
{ field: { $in: [, , ... ] } }
Example 2: $and mongodb
{ $and: [ {}, {}, ... ] }
Example 3: and in mongodb
{ $and: [ , , ... ] }
Example 4: $and in mongodb
db.inventory.find( { $and: [ { price: { $ne: 1.99 } }, { price: { $exists: true } } ] } )