Back

[SOLVED] How to do order by on REST?

  • 0
  • Databases
  • Cloud
bluesky
5 Nov, 2024, 12:59

I want to do order

queries[]={"method": "orderAsc", "values": ["$id"]}

This parameter is correct? Cause nothing happened

TL;DR
Solution: Based on the provided code snippet, the correct way to order by in a REST API query would be: `queries[0]={"method":"orderAsc", "attribute":"$id"}` This will order the results in ascending order based on the `$id` attribute.
Kenny
5 Nov, 2024, 15:59

I believe it would be

queries[0]={"method":"orderAsc", "attribute":"$id"}

Kenny
5 Nov, 2024, 16:00
bluesky
6 Nov, 2024, 02:35

Okay, thank's it's work

Kenny
6 Nov, 2024, 02:43

[SOLVED] How to do order by on REST?

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more