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
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.
WarrenBelz
146,658
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,999
Most Valuable Professional