Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

REST API sort by multiple fields?

default discord avatar
danielshamburgerlast year

Is there a way order documents by multiple columns/fields via the REST API, similar to how you can with SQL:

ORDER BY column1, column2, ...

TIA!



I should have specified, using postgres. [Looking at the source code](

https://github.com/payloadcms/payload/blob/32ed95e1ee87409db234f1b7bd6d2e462fd9ed5d/packages/db-postgres/src/queries/buildQuery.ts

) it unfortunately doesn't appear to be supported.

    Star on GitHub

    Star

    Chat on Discord

    Discord

    online

    Can't find what you're looking for?

    Get dedicated engineering support directly from the Payload team.