Hello,
I need your help in finding the best solution for this situation:
I have and object with some attributes that could contain one ore more values. These attribute names differ with only one letter (in fact is a number) for example: A1, A2, A3.
Let's assume the object will look like this:
{
"ObjectTitle":"Some Title",
"A1":[
{
"Item":"A1I1",
"Value":"A1V1"
},
{
"Item":"A1I2",
"Value":"A1V2"
}
],
"A2":[
{
"Item":"A2I1",
"Value":"A2V1"
}
],
"A3":[
{
"Item":"A3I1",
"Value":"A3V1"
},
{
"Item":"A3I2",
"Value":"A3V2"
}
]
}
Now I need to collect the values of these attributes in their respective array variables arrA1, arrA2, arrA3.
I have managed to to this for one of the arrays:

Where "Apply to each" condition is: variables('objContract')?['A1']
and "Append to array variable" value is: item()?['Value']
Now, my problem is that I have to do this for about 10 attributes.
So the question is: there is a way not to repeat the "Apply to each" for every array variable but to create a bigger "Apply to each" (for an numeric array [1,2,3]) and use some dynamic variable names to populate content for all arrays? (because all depends on a single letter)
Kind Regards,
Lucian