you can use
$lte
selects the documents where the value of the field is less than or
equal to (i.e. <=) the specified value.
$gte
selects the documents where the value of the field is greater than or
equal to (i.e. >=) a specified value
db.collectionName.find( { build : { $gte: "b3312", $lte : "b3314"} } )
result:
/* 1 */
{
"_id" : ObjectId("60118271fec3d8db92a39872"),
"build" : "b3312"
}
/* 2 */
{
"_id" : ObjectId("60118279fec3d8db92a3987e"),
"build" : "b3313"
}
/* 3 */
{
"_id" : ObjectId("6011827ffec3d8db92a3988b"),
"build" : "b3314"
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…