A23149577
A23149577

Reputation: 2145

Set and unpack array of objects in Azure Logic App parameters

I have a logic app that is triggered by schedule (no incoming http request that I can retrieve variables from) and I want to set some parameters within this logic app that are retrieved within a For each block. Each parameter that should be retrieved inside For each block is a tuple: ('foo', 'bar'). I was hoping to set these params in the logic app parameters as:

Name: MyConfigArray
Type: Array
Default Value: [('foo', 'bar'), ('baz', 'qux')]

But it throws Enter a valid array error.

I also want to be able to unpack each individual element inside For each block Current item. I'm looking for the best practice here. Thanks

Upvotes: 0

Views: 1379

Answers (1)

10p
10p

Reputation: 6686

To create an array of objects, the following syntax can be used: [{"a":["foo","bar"]},{"a":["baz","qux"]}]

To access individual values inside For each block, you can use an expression like this: item().a[0] - it would return "foo" and "baz".

Upvotes: 1

Related Questions