use and in mongodb code example
Example 1: $and mongodb
{ $and: [ {<expression1>}, {<expression2>}, ... ] }
Example 2: $and in mongodb
db.inventory.find( { $and: [ { price: { $ne: 1.99 } }, { price: { $exists: true } } ] } )
{ $and: [ {<expression1>}, {<expression2>}, ... ] }
db.inventory.find( { $and: [ { price: { $ne: 1.99 } }, { price: { $exists: true } } ] } )