小编mc5*_*382的帖子

MongoDB查询帮助 - 查询子对象中任何键的值

我想对此集合执行查询,以确定哪些文档具有与特定值匹配的任何键.这可能吗?

我有一组文件,如:

{
    "things": {
        "thing1": "red",
        "thing2": "blue",
        "thing3": "green"
    }
}
Run Code Online (Sandbox Code Playgroud)

编辑:为了简洁

mongodb

37
推荐指数
3
解决办法
3万
查看次数

标签 统计

mongodb ×1