I'm wondering if you change the sort key to another attribute does that work ? I think sort order breaks at
{ records: { '$slice': [ '$data', -10, { '$ifNull': [ 10, '$total.source' ] } ] }, pagination: { total: '$total.source', limit: { '$literal': 10 }, page: { '$literal': 1 }, pages: { '$ceil': { '$divide': [ '$total.source', 10 ] } } } }
upto above stage sort order preserved . any suggestions to fix that ?
Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment's permalink.
Hide child comments as well
Confirm
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
I'm wondering if you change the sort key to another attribute does that work ? I think sort order breaks at
{ records: { '$slice': [ '$data', -10, { '$ifNull': [ 10, '$total.source' ] } ] }, pagination: { total: '$total.source', limit: { '$literal': 10 }, page: { '$literal': 1 }, pages: { '$ceil': { '$divide': [ '$total.source', 10 ] } } } }
upto above stage sort order preserved . any suggestions to fix that ?