Sorted Collections
If you want to wort with sorted collections, you could either sort in the client or let the server do that for you.
API Client
If you are using API Client directly you can pass sort as param to all methods to do GET requests.
api.projects.read({ sort: ['title'] });All of these methods will return the data sorted by title. Possible values are:
attributeNameASC attributeName-attributeNameDESC attributeName
The first two return the data in ascending order and the later return in descending order.
useCollection Hook
If you are using the useCollection hook in React you could similarly use sort as above.
const { data: projects } = useCollection('projects', { sort: ['title'],});The possible values are the same as in the API Client.
attributeNameASC attributeName-attributeNameDESC attributeName