查询条件

db.user.find({"age":{"$gte":18,"$lte":30}})

$lt  <
$lte  <=
$gt   >
$gte   >=
$ne  !=
$not   不在。。。之中   //{"$not":[2,5]}  返回1,3,4,6,7,8,9
$in     在。。。之中
$or   或者

原文地址:https://www.cnblogs.com/xiongwei89/p/3316939.html