mirror of
https://github.com/typicode/json-server.git
synced 2025-07-30 13:42:11 +08:00
[sort] nested
This commit is contained in:
@ -141,7 +141,7 @@ module.exports = function (db, name) {
|
||||
_order = _order || 'ASC'
|
||||
|
||||
chain = chain.sortBy(function (element) {
|
||||
return element[_sort]
|
||||
return _.get(element, _sort)
|
||||
})
|
||||
|
||||
if (_order === 'DESC') {
|
||||
|
Reference in New Issue
Block a user