A little spike demonstrating how the client might go about transforming the groups response into one organized by organization
for the purposes of display in the UI.
The data
here represents the current structure of the groups
API response with the addition of minimal ("expanded") organization objects—presumably this would be analogous to what is available to components through groups.all()
.
The code does not mutate the original groups
data.