Mongo通过子对象查找项目
{ "_id" : ObjectId("4f93aaddaca610f76b000000"),
"count" : NumberLong(2),
"items" : [
{"count" : NumberLong(1),
"options":{ "1":"track","2" : "track" } },
{"count":NumberLong(2),
"options":{"1":"as","2" : "sadf" } }
]
}
如何对子对象中的事物进行排序,例如限制每个请求的项目列表
我期望的结果是这个
{ "_id" : ObjectId("4f93aaddaca610f76b000000"),
"count" : NumberLong(2),
"items" : [
{"count" : NumberLong(1),
"options":{ "1":"track","2" : "track" } },
]
}