我继承了一个包含类似下面文档的集合。我想找到CreatedDate Value.Date所在的所有文件(比如说)" 2014-11-29"和EquipmentCategory Value.Text。@ id是" M"。
{
"_id" : ObjectId("55deebb1f7db2e09184e1126"),
"ns0:Equipment" : {
"EquipmentNo" : "98031047",
"EquipmentDescription" : "Machine X",
"SerialNo" : "EX87GA",
"Attributes" : {
"Attribute" : [
{
"Name" : "CreatedDate",
"Values" : {
"Value" : {
"Date" : "2014-11-29"
}
}
},
{
"Name" : "CreatedBy",
"Values" : {
"Value" : {
"Text" : "MEE903070"
}
}
},
{
"Name" : "EquipmentCategory",
"Values" : {
"Value" : {
"Text" : {
"@id" : "M",
"#text" : "Machines"
}
}
}
},
...
]
}
}
}
我正在寻找可以执行此操作的MongoDB shell或C#查询。