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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Challenge: merge two a...
Power Automate
Unanswered

Challenge: merge two arrays without looping

(0) ShareShare
ReportReport
Posted on by 9

How can we go about accomplishing the following?

 

Challenge

Merge two arrays without looping.

 

Scenario

Array 1 contains user information.

{
 "ownerid":"123",
 "name":"John Doe",
 "email":"jdoe@contoso.com"
},
{
 "ownerid":"567",
 "name":"Jim Johnson",
 "email":"jjohns@contoso.com"
}

 

Array 2 contains product information.

{
 "product":"25-inch widgets",
 "price":"$65.00",
 "ownerid":"123"
},
{
 "product","30-inch widgets",
 "price":"$250.00",
 "ownerid":"567"
}

Result in Array 3

{
 "product":"25-inch widget",
 "price":"$65.00",
 "ownerid":"123",
 "name":"John Doe",
 "email":"jdoe@contoso.com"
},
{
 "product":"35-inch widget",
 "price":"$250.00",
 "ownerid":"567",
 "name":"Jim Johnson",
 "email":"jjohns@contoso.com"
}

 

Requirements

  • No looping - takes too long with the number of products
  • No third-party plugins
  • Can use premium features
Categories:
I have the same question (0)
  • VictorIvanidze Profile Picture
    13,079 on at

    I'll be glad to be wrong but I believe that's impossible.

  • Posegate Profile Picture
    9 on at

    Does anything on this web page give you hope?

  • Paulie78 Profile Picture
    8,422 Moderator on at

    I think it is impossible also. How is that page relevant? Is your data source SQL? All you put above was two JSON arrays.

  • Posegate Profile Picture
    9 on at

    You're right! That was not helpful. The JSON is being created based on CDS queries. I got ahead of myself and didn't do a good job outlining that. I wondered if using SQL to query CDS could give more options to create the array.

  • msaqlie Profile Picture
    18 on at

    If they are 2 arrays of JSON objects you can use:

    replace(string(body('Select')), ']'',')  and 
    split(string(body('Select_2')), '[')[1]
    in a compose to join the 2 arrays

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
trice602 Profile Picture

trice602 398 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 331 Super User 2025 Season 2

#3
Expiscornovus Profile Picture

Expiscornovus 203 Most Valuable Professional

Last 30 days Overall leaderboard