我在 Mongo 中有这些数据:
{
"_id": ObjectId("505fd43fdbed3dd93f0ae088"),
"categoryName": "Cat 1",
"services": [
{
"serviceName": "Svc 1",
"input": [
-------------------------------------------------------------------------
{ "quantity": 10, "note": "quantity = 10" },
-------------------------------------------------------------------------
{ "quantity": 20, "note": "quantity = 20" }
]
},
{
"serviceName": "Svc 2",
"input": [
{ "quantity": 30, "note": "quantity = 30" },
{ "quantity": 40, "note": "quantity = 40" }
]
}
]
}
现在我想提取{ "quantity" : 10, "note" : "quantity = 10" }
输入数组的元素。我该如何处理 Mongo?