web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How to split and merge...
Power Automate
Unanswered

How to split and merge array of json properties values.

(0) ShareShare
ReportReport
Posted on by 2

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!

  

 

 

Categories:
I have the same question (0)
  • Verified answer
    Mitanshu Profile Picture
    1,650 Moderator on at

    I have a cloud Flow which will take

     

    happyume_2-1629360413585.png

     

    and result in

    happyume_3-1629360428523.png

     

    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.

     

    happyume_0-1629360637789.png

     

     

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard