Course lesson
Order the Results Returned from a GROQ Query
GROQ provides a useful order function for sorting the results of any Array in your JSON. Pass in the name of the property that you want to sort on and then the desc or asc to determine the order and you'll get your data back just how you want it.
- Duration
- 2 min
- Access
- Free
- Transcript
- Needs source
GROQ provides a useful order function for sorting the results of any Array in your JSON. Pass in the name of the property that you want to sort on and then the desc or asc to determine the order and you'll get your data back just how you want it.