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
Unanswered

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…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard