Discussion regarding the complex response structure for REST & GraphQL (Developer Experience)

I see three possible ways to solve this.

First:
Create a custom route for that use case, attach a custom controller to it, which calls the core controller, but transforms the response to your needs.

Second:
Create a custom route which uses the default controller, but attach a custom middleware to it to transform the response to your needs after the default controller has returned the response.

Third:
Use Transformer | Strapi Market which reduces the depth of the returned object. You’d still have an object in the response, but it’s not as deeply nested.