Back

How to group the response of listDocument?

  • 0
  • Databases
  • Flutter
Mosh Ontong
21 Oct, 2024, 02:27

For example: User-A

  1. 40
  2. 80
  3. 90

User-B

  1. 10
  2. 5
  3. 8

Now I want to get a documents that will fetch the highest based on user so the expected result could be: 1 - User-A = 90 2- User-B = 10

TL;DR
Developers are seeking a way to group responses from the listDocument function by user and retrieve the highest value for each user. Solution: Use a script to iterate through the user responses, grouping them by user and retrieving the highest value for each user.
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