按创建时间反向对来自虚假 Rest api (npm json-server) 的 GET 请求的数据进行排序
我为我的待办事项应用程序创建了一个带有 JSON-Server 的假 Rest API。 是否可以按创建时间对数据进行排序。这样最新的待办事项就会出现在第一位
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
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
JSON 服务器排序 可能就是您正在寻找的。
像这样的东西:
/todos?_sort=createTime&_order=desc
JSON Server Sorting is probably what you're looking for.
Something like this:
/todos?_sort=createTime&_order=desc