When using services Structures are created for me.
I create Actions which other module developers can call to obtain the data for the service. I want to isolate the details of how I obtained the data so when the service changes my action can have the same instance and all the UI using the data doesn't need to be re-developed.
To achieve this I copy the structure and create my own structure of a similar name. I create a public action which uses the copied structure as output. It has to copy the data from the generated structure to the cloned structure.
Sometimes this is complex and error prone and requires many sometimes nested loops.
Can there be a single action which could do this if the structures matched?
(I understand that when the service interface changes in future I would have to fall back to manual assignment as the new structure would no longer match.)