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 / Need help in appending...
Power Automate
Answered

Need help in appending key-value to an object variable in power automate

(0) ShareShare
ReportReport
Posted on by 13

Hi guys,

I need help in appending an object variable inside a Apply to each action and then later append that object variable to an array outside of an apply to each. I do not have a clear picture of how to achieve this. Can you guys help me out in this.

Categories:
I have the same question (0)
  • Verified answer
    Tteixeira Profile Picture
    Microsoft Employee on at

    Hi,

     

    I believe you can achieve this using the Append to Array step and addProperty function (assuming you want to add a key value to an object).

     

    Here's an example I've built:

    teixeira_0-1642166940817.png

     

     

    Steps:

    Array: Some objects with dummy data.

    Parse JSON: Using the Array content in order to be able to go through each item later in the Apply to each.

    Empty Array: So I can populate the new array according to the condition I've defined inside the Apply to each.

     

    Apply to each: I'm going through each object and performing a condition, If it's true then I'm using the addProperty function to add a property to the object and then populate the empty array (through Append to Array step) with the new object data. If it's not true, then I'm leaving it the way it was before and appending the same object data with no new property.

     

    If you have any additional questions feel free to ask 😀

     

     

    If this post helps you with your problem, please consider marking it as Accepted solution.If you like my response, please give it a Thumbs Up 👍

     

    Thanks,

    Tiago

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
Haque Profile Picture

Haque 58

#2
David_MA Profile Picture

David_MA 53 Super User 2026 Season 1

#3
Expiscornovus Profile Picture

Expiscornovus 36 Most Valuable Professional

Last 30 days Overall leaderboard