Logical Operators
/ age > 31 and location = NYC
db.friendsCollection.find(
{
$and:
[
{age : {$gt : 31}}
,{location: "NYC"}
]
});
// Greater than or equal to 31 and name = Ross
db.friendsCollection.find(
{
$and:
[
{age : {$gte : 31}}
,{firstname: "Ross"}
]
});Last updated