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 / Make a combined array ...
Power Automate
Unanswered

Make a combined array out of 2 or more arrays with the same rows from all.

(0) ShareShare
ReportReport
Posted on by 256

I have found methods that use an 'apply to each', but this relies on inputting the arrays. I have these arrays built and i would like to combine them. The number of arrays within the variable can change. Does anyone know of a template flow that I can call to combine x amount of arrays? Or, better yet, is there a quick way to merge arrays where we are joining each row?

jaeiow_0-1656601583047.png

 

[
 "[{\"Filename\":\"Excel VBA folder files.xlsx\"},{\"Filename\":\"Data.xlsx\"},{\"Filename\":\"ALAN.xlsx\"}]",
 "[{\"Title\":\"Excel VBA folder files\"},{\"Title\":\"Data\"},{\"Title\":\"ALAN\"}]",
 "[{\"folder\":\"Export files from local folders\"},{\"folder\":\"Export files from local folders\"},{\"folder\":\"Export files from local folders\"}]"
]

Sample Arrays 

Categories:
I have the same question (0)
  • takolota1 Profile Picture
    4,980 Moderator on at

    @jaeiow 

     

    Do you mean append arrays, so add one array’s items below another’s or do you mean merge a key/column from one array into another array based on a primary key?

  • jaredbidlow Profile Picture
    256 on at

    I want to it by index (not present, but self explanatory 1, 2, 3....). This merging of arrays of equal length into one array will collect all the keys/value from the indices into a {}. The number of times it does this will be variable, but I have only found solutions based on 2 or 3 arrays, not variable. I think a nested "Do Until" could do the trick, but this would take very long even if it did.

  • takolota1 Profile Picture
    4,980 Moderator on at

    If you’re just trying to append a variable number of arrays, you should be able to use an Apply to each on the array of arrays and in each loop set a variable action to append the next array with a union( ) of its previous variable value & the loop item.

  • jaredbidlow Profile Picture
    256 on at

    Let me back up to array of array creation. In order to get the array of arrays, all I did was do

    concat(',',body('Select_2')) in an "append to string var" inside a loop. So i don't think that this is a true array that can be used in an apply to each. But I could be wrong, Is there another way to build the array or should it work with the current format.

     

    "ExpressionEvaluationFailed. The execution of template action 'Apply_to_each' failed: the result of the evaluation of 'foreach' expression '@variables('string')' is of type 'String'. The result must be a valid array."

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!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 594

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 281 Super User 2026 Season 1

Last 30 days Overall leaderboard