To get the above array, we have to convert to XML and then using a Select using the below to link the questions and answers.
addProperty(item(), 'Answer', xpath(outputs('XML'), concat('//root/array[Sequence/text()="', item()['Sequence'], '"]/Answer/text()')))
We then use another Select action from the output of the above and use
concat('| ',item()?['Question'],' | ',item()?['Answer'],' |')
We then want to use the array in an Approvals action, as below, and we are currently using
join(body('Map_Questions_and_Answers_for_Approval'),decodeUriComponent('%0A'))
to do this.
But the output received by the Approver still has [" and "] around each Response. How can we remove these in the easiest way? Converting to a string, using replace() and then back into an array is really complicated, as we have to use XML to get the array in the first place.
Many thanks,
SD.