摘要: db.getCollection('test').aggregate([ {'$match': {'codes.name': 'a'}}, // 检索文档 {$unwind: "$codes"}, // 拆分数组 {'$match': {'codes.name': 'a'}}, // 检索数组元素 {'$sort': {'codes._id': -1}},... 阅读全文
posted @ 2017-07-03 17:38 夜未央丿 阅读(1564) 评论(0) 推荐(0) 编辑