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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / How do i iterate every...
Power Automate
Answered

How do i iterate every value in a http response and pass it to a variable called T1?

(0) ShareShare
ReportReport
Posted on by 403

Hi, this may sound complicated, but let me try my best to explain it in an easy way.

In Power Automate, I have used the HTTP action. I passed input JSON in the body, and I received a response like this:

{
  "Measurement_Values": [
    6.35,
    7.14,
    7.92,
    8.74,
    9.52,
    10.31,
    11.13,
    11.91,
    12.7,
    14.27,
    15.88,
    17.48,
    19.05,
    20.62,
    22.22,
    23.83,
    25.4,
    26.97,
    28.58,
    30.18,
    31.75
  ]
}

How can I iterate through each value and assign it to a variable called 'T1'? .
During the first loop, T1 should be 6.35, in the second loop, T1 should be 7.14, and so on.
Note: The value of T1 should be passed in a Compose output below (please see the image below)
 
Jupyter123_0-1680949096309.png

So the above compose output [ after assigning T1 value from the first HTTP response] then i will pass as JSON input using another HTTP action and it will get response like this 

Jupyter123_1-1680949306341.png

So, the "adequacy_check" ("Ok" or "Not Ok") depends entirely on the T1 variable value. If the adequacy check is "Not Ok," then use the next value of T1 by iterating through the values one by one until the "adequacy_check" is "Ok." Once the adequacy check is "Ok," stop iterating.

How to do this? Can anyone help me?

Categories:
I have the same question (0)
  • MarcelLehmann Profile Picture
    378 on at

    I'm not sure if I understand your full question, but maybe the setProperty expression would help you.
    Here is a reference ⇒ (276) Power Automate Expressions How To: setProperty - YouTube

  • AdrianTorres Profile Picture
    43 on at

    Try parsing the received response into a JSON Object, which will then allow you to add the “Apply To Each” step to iterate through the now parsed array of your JSON Object.

  • Verified answer
    zmansuri Profile Picture
    6,048 Super User 2024 Season 1 on at

    Instead of stopping the iteration take one string variable inside the loop and initiate that variable with "Not OK". So just after my last compose in the loop, call your http action which checks for the value. If the value is OK then and only then store the value "OK" in that variable. That way at the end of the loop your variable will tell you weather the value was Ok or Not Ok. 

    Also if you need to capture the exact value that was Ok. Then do the same thing in the condion, YES side. And store that value of T inside the variable. 

     

     

    To explain the flow. I have taken one array of values. Then added an apply to each loop and take that array in the iteration. Now i can get the current value we are iterating by using "item()" function. So each time my output compose have different T

    a12.pnga13.pnga14.pnga15.png

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 60 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 54

#3
Expiscornovus Profile Picture

Expiscornovus 47 Most Valuable Professional

Last 30 days Overall leaderboard