Group results within an API
Hi everyone!
I'm building a journaling app and have a page that allows users to view all their entries. They are currently presented as different items: ie. every entry is separate, even if written on the same day:
How can I structure my API so that they are grouped by date: ie. every entry done on the 02.Jan.2022 is one group, like this:
Here is the function stack I have currently (it decrypts each entry):
And here is the output:
Thanks, any help much appreciated.
(I'm using Draftbit as a FE incase that's important)
Best Answer
-
Hey Steve,
On a very high level, I recommend using the aggregate feature in the sort component of the output tab. Within the aggregate function choose to group by “created_at” and have them grouped by the day they were created.
Let me know if you need any more assistance by tagging me in any new comment.
-Evan
Answers
-
@evanwaller thanks buddy! I shall check this out and see what I can achieve :)
Categories
- All Categories
- 53 ? Announcements
- 47 ? Releases
- 37 ? Welcome
- 983 ? Help! I'm a Noob
- 125 ? No-Code Front-Ends
- 633 ? Working with APIs
- 439 ? Transforming data
- 126 ? Connect Xano to ...
- 50 ?? Find an Expert
- 348 ❓Other questions
- 35 ? Security
- 22 ✂️ Snippets
- 19 ? Showcase
- 7 ?️ Xano Chatter
- 62 ? Video Tutorials
- 171 ? Request a feature
- 229 ? Report a Bug
- 19 ? Templates & Extensions
- 7 ? Feedback