mongo
mongo copied to clipboard
$and Operator Error
when two condition will be apply: $and ->operator:
db.emp.find({$and:[{'sal':{$get:5000}},{'dept':'coding'}]})
without $and opeartor: same result will be shown db.emp.find({'sal':{$get:5000}},{'dept':'coding'})