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 / Combine all items from...
Power Automate
Answered

Combine all items from array 1 with each of array 2

(0) ShareShare
ReportReport
Posted on by 13

Hi!

I have two arrays coming from two different sources in the following format:

Array1

 

[
 {
 "Date": "2024-03-14"
 },
 {
 "Date": "2024-03-15"
 }
]

 

 

Array 2

 

[
 {
 "Start": "2024-02-01",
 "End": "2024-05-31",
 "Name": "Event1"
 },
 {
 "Start": "2024-03-05",
 "End": "2024-03-15",
 "Name": "Event2"
 }
]

 

 

What I want to achieve is this:

 

[
 {
 "Date": "2024-03-14"
 "Start": "2024-02-01",
 "End": "2024-05-31",
 "Name": "Event1"
 },
 {
 "Date": "2024-03-14"
 "Start": "2024-03-05",
 "End": "2024-03-15",
 "Name": "Event2"
 },
 {
 "Date": "2024-03-15"
 "Start": "2024-02-01",
 "End": "2024-05-31",
 "Name": "Event1"
 },
 {
 "Date": "2024-03-15"
 "Start": "2024-03-05",
 "End": "2024-03-15",
 "Name": "Event2"
 }
]

 

 

I am not sure what the right terminology is, but I guess I want to duplicate the array 2 by the number of items in array 1. I want to be able to check if each Date from array 1 (there will be a 7 days period each day) is during the period (Start-End) in array 2, and if it is, add to a variable to get a nice html email.

 

I hope it makes sense and someone can help me! Still working on my journey to understand arrays well. Thank you

Categories:
I have the same question (0)
  • Verified answer
    JeremP Profile Picture
    13 on at

    Oh well. Found.

     

    Apply to each, set string variable with values from Array1, then nested Apply to each (2) to append to array variable, array with string variable and values from Array 2.

     

    Why did it take me two days to figure out.

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 307 Super User 2026 Season 1

#2
David_MA Profile Picture

David_MA 269 Super User 2026 Season 1

#3
Power Platform 1919 Profile Picture

Power Platform 1919 115 Super User 2026 Season 1

Last 30 days Overall leaderboard