猫鼬。按数组中的最后一个对象排序

时间:2018-10-31 20:17:51

标签: mongodb sorting mongoose

我有void _attach_ms(uint32_t milliseconds, bool repeat, callback_with_arg_t callback, uint32_t arg); 这样的收藏:

Users

我想按数组[ { _id: 1, records: [ { honor: 1 },{ honor: 2 } } ]}, { _id: 2, records: [ { honor: 1 },{ honor: 200 } ]}, { _id: 3, records: [ { honor: 1 },{ honor: 20 } ]}, ] 中的最后一个元素按降序对Users进行排序。

已使用

records

0 个答案:

没有答案