如何在列表中找到嵌入式文档?

时间:2018-11-05 03:05:46

标签: mongodb mongodb-query

mongodb中有一个文档。 dbname是“测试”,集合是“商品”,文档如下:

{
        "_id":"1", 
        "Name":"toys",
        "Type":"child", 
        "Rehab":"None",
        "Data":[
            "2005/06/07":
            {
                "item":"212375",
                "weight":159,
                "height":164,
                "Price":157
            },

            "2005/06/08":
            {
                "item":"212376",
                "weight":159,
                "height":164,
                "Price":157
            }
        ] 
    }

在这种情况下,我想通过find()命令获得以下项目。如何定义find函数的限定词?

            "2005/06/07":
            {
                "item":"212375",
                "weight":159,
                "height":164,
                "Price":157
            }

0 个答案:

没有答案