I am able to do a group by query like this
But unable to return a list of values for a single group by. say group by release_year or title or locations.
For example, when I use group by release_year, I'd like to return the following
{
"release_year": "1949",
"entires": [
{
"title": "blh blh"
"locations": "soma"
}
]
}
Do you know how i can do this?
The $group
parameter is used for aggregation, not for nesting like you're trying to do. There isn't a SoQL parameter or function that will change the structure of the JSON response like you're looking for.
If I were you, I'd look at $order
-ing by release_year
and then construct the nesting you're looking for in code.