'Sorting Data of a GET request from an fake rest api (npm json-server) by creation time reverse

I created a fake Rest API with JSON-Server for my todo app. Is it possible to sort the data by creation time. so that the latest todos appear in first place



Solution 1:[1]

JSON Server Sorting is probably what you're looking for.

Something like this:

/todos?_sort=createTime&_order=desc

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 vogomatix