Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Combining two or more different arrays into one

(1) ShareShare
ReportReport
Posted on by 78

Hi,

 

I would like to combine multiple different arrays into one. I have for example the following two arrays:

["123","456","789","987"]

["John","Patrick","Simon","Bill"]

 

I would like to have the following:

[

{

"no":"123",

"name":"John"

},

{

"no":"456",

"name":"Patrick"

},

{

"no":"789",

"name":"Simon"

},

{

"no":"987",

"name":"Bill"

}

]

 

Thanks!

  • nzacharakis Profile Picture
    105 on at
    Re: Combining two or more different arrays into one

    Excellent solution! Very helpful, thank you 😀

  • Verified answer
    v-bacao-msft Profile Picture
    on at
    Re: Combining two or more different arrays into one

     

    Hi @SBS ,

     

    Assuming the number of elements in the two arrays is equal, you can refer to the Flow in the attachment to achieve your needs.

    You can import attachments to see the details of the Flow configuration.

    Please take a try.

     

    Best Regards,

  • Verified answer
    abm abm Profile Picture
    32,472 Most Valuable Professional on at
    Re: Combining two or more different arrays into one

    Hi @SBS 

     

    Follow the below steps.

     

    image.png

     

    image.png

     

    Above expressions are as follows:

    (1) For the do until loop expression is
         length(variables('Id'))
    (2) Append to String variable 2
         variables('Id')[variables('index')]
         variables('Names')[variables('index')
    (3) Finally the condition
         length(variables('Id'))
     
    Final flow action outside the do until loop
    image.png
     
    Here is my final test result
     
    image.png
     
    If you have any questions please let me know.
     

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

Michael Gernaey – Community Spotlight

We are honored to recognize Michael Gernaey as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >