mongo语句 查询字段是string类型 不包含

 

 

db.getCollection('表名字').find({
    "字段1": { "$exists": true },
    "字段2": {
        "$exists": true,
        "$type": "string",
        "$not": /不包含的内容/
    }
})

 

posted @ 2024-03-07 16:31  AngDH  阅读(30)  评论(0编辑  收藏  举报