Hi everyone.
I'm looking to maximise efficiency by reworking an existing flow. The section in particular that I am trying to replace uses a Get items -> Apply to each item -> Append to array variable approach. I have managed to improve other flows by replacing these sections with Get items -> Select -> Append to array variable, as this allows me to add everything I need to the array all at once, instead of one item at a time.
Below is my attempt at applying the Select approach to this particular flow:
We start with a simple Get items -> Select, to reformat the output of Get items while trying to avoid a silly Apply to each -> Append to array variable approach.
Note that I am trying to produce a nested output.
However, the output of the Select action insert unhelpful characters:
Now I can use a Compose action to remove incorrect characters using a few replace() functions.
This gives me something that looks exactly like the output I need. However, this output is now a string where I need an array.
Is there a way I can force Power Automate to treat this output as an array? Aside from the lack of line breaks, this string output looks identical to the array output that the existing flow produces,