您好我试图在此阵列中找到嵌入式文档:
"_id" : 0,
"name" : "Sykes",
"orders" : [
{
"invoiceNumber" : 788,
"cart" : [
{
"item" : 0,
"pkgId" : 3,
"qty" : 10
}
]
},
{
"invoiceNumber" : 801,
"cart" : [
{
"item" : 1,
"pkgId" : 1,
"qty" : 8
}
]
}
我试过这个:
db.customer.find({_id:1},{'orders.invoiceNumber':1,_id:0}).pretty()
我需要将此命令转换为PHP。有什么帮助吗?