How to manipulate response before going to data variable

I have an API that returns a list of objects for each person. However, if the person only has one object the API returns just the object, not a list.

So, I thought I could manipulate the output of the call with a formula before putting it into the data variable, but the call fails already in the get record collection flow function, because it already recognizes it is not a list. And I don’t see anyplace in the data resource to manipulate the output (except for the response key path, but this is not dynamic.

I imagine I can make this call with HTTP Request flow function, and then do whatever I want, but then I lose the whole mechanism of the data resource/data variables.

Anything I can do?

I have been “hitting” exactly the same problem: REST API GetCollection payload - #6 by Piotr_Tesny
And the Appgyver team advice is to use the HTTP Request flow function…to create your own bespoke GetCollection variant: REST API GetCollection payload - #9 by Mevi

I hope that helps; kind regards; Piotr