
Announcements
Hi All,
We have a survey response set in JSON like so...
[
{
"Question": "What are your favorite colors?",
"Response": ""\"RED\",\"BLUE\""
}
{
"Question": "What are your favorite colors?",
"Response": "\"YELLOW\",\"GREEN\",\"PURPLE\",\"ORANGE\""
}
]
I need to create a row in a table for each color in the above dataset.
How achieve with Power Automate?
Many thanks!
I have a cloud Flow which will take
and result in
1 - Using initialize a new variable, create array called colorArray : this will store your final output
2 - Then use Apply to each on your Response Array
3 - Create a Compose action and use expression split(items('Apply_to_each')?['Response'],',') - this will give you an array of colors for each survey response (one at a time).
4 - Create Apply to each 2 (nested loop) and using output from Step 3, append array variable from Step 1
5 - Outside both apply to each, create a compose action and put your colorArray to see the final output.
6 - Loop through this colorArray (Apply to Each) and create a row in the table.
You can make it more efficient by eliminating certain steps, which have been created for troubleshooting.