Showing results for 
Search instead for 
Did you mean: 
New Member

Iterate inside JSON object


I'm new to this community and using power automate. Any help or suggestions to solve below is greatly appreciated! Thanks !


Expected output- Create a PDF of MS Form Submissions. the PDF should include the questions and related response.


Current state- Created a flow using HTML template which has questions hard-coded inside the template. The compose operation changes the place holders for each answer in the HTML template. Convert to PDF using OneDrive actions.


Ideal state-

  1. Using "invoke an HTTP request" parse the JSON file to get questions (used this string in URL- /formapi/api/forms('@{concat(triggerBody()?['resourceData']?['formId'])}')?$expand=questions​
  2. iterate on each question that's part of JSON and related response <- need help here
  3. Add this to the HTML template and convert to PDF using OneDrive actions


I feel, I'm doing it wrong with the JSON template. Any suggestions on:

  1. how to create a template that will just parse the section which contains the array that is part of questions tag in the original JSON?
  2. Iterate inside of a particular JSON key and assign answer


Why this?  It will significantly remove the "compose" steps in current state , since there are lot of questions in MS Form. From maintenance perspective,  any change to Form questions, would automatically flow in the pdf without having to change the html template.

Community Support
Community Support

Hi @prateekF,


Could you please share an example of your desire?

About the iterate JSON, you could refer to this post:

Solved: Help with arrays, jsons and iterations - Azure ARM... - Power Platform Community (microsoft....


Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

MPA Community Blog

Power Automate Community Blog

Check out the community blog page where you can find valuable learning material from community and product team members!

Top Solution Authors
Top Kudoed Authors
Users online (7,119)