我想在_id
为1的文档中的数组中获取price
个quantity
为3的对象
{
_id: 0,
items: [
{ item_id: 43, quantity: 2, price: 10 },
{ item_id: 2, quantity: 1, price: 240 }
]
}
{
_id: 1,
items: [
{ item_id: 23, quantity: 3, price: 110 },
{ item_id: 103, quantity: 3, price: 5 },
{ item_id: 38, quantity: 2, price: 300 }
]
}
{
_id: 2,
items: [
{ item_id: 4, quantity: 1, price: 23 }
]
}
{
_id: 3,
items: [
{ item_id: 1241, quantity: 5, price: 13213 },
{ item_id: 4321, quantity: 6, price: 43214 },
{ item_id: 12341, quantity: 72, price: 12414 }
]
}
{
_id: 4,
items: [
{ item_id: 1241, quantity: 5, price: 13213 },
{ item_id: 4321, quantity: 6, price: 43214 },
{ item_id: 12341, quantity: 72, price: 12414 }
]
}
{
_id: 5,
items: [
{ item_id: 1241, quantity: 5, price: 13213 },
{ item_id: 4321, quantity: 6, price: 43214 },
{ item_id: 12341, quantity: 72, price: 12414 }
]
}
我该怎么办
相关问题 更多 >
编程相关推荐