Azure Logic Apps
An Azure service that automates the access and use of data across clouds without writing code.
3,222 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Say I have an output like below, what function could I use to ouput only the first (A) and third (C) elements?
[
"A=testA",
"B=testB",
"C=testC",
"D=testD",
"E=testE"
]
@Jan de Mul Thanks for reaching out. You can access the elements in below ways either through loop or directly through expression.
@variables('arritems')[2]
@items('For_each')
Here is sample logic app code reference with the above mentioned examples.
{
"definition": {
"$schema": "https://schema.management.azure.com/providers/Microsoft.Logic/schemas/2016-06-01/workflowdefinition.json#",
"actions": {
"Compose_1": {
"inputs": "@variables('sett')[2]",
"runAfter": {
"Initialize_variable": [
"Succeeded"
]
},
"type": "Compose"
},
"For_each": {
"actions": {
"Compose": {
"inputs": "@items('For_each')",
"type": "Compose"
}
},
"foreach": "@variables('sett')",
"runAfter": {
"Compose_1": [
"Succeeded"
]
},
"type": "Foreach"
},
"Initialize_variable": {
"inputs": {
"variables": [
{
"name": "sett",
"type": "array",
"value": [
"A=testA",
"B=testB",
"C=testC",
"D=testD",
"E=testE"
]
}
]
},
"runAfter": {},
"type": "InitializeVariable"
}
},
"contentVersion": "1.0.0.0",
"outputs": {},
"parameters": {
"$connections": {
"defaultValue": {},
"type": "Object"
}
},
"triggers": {
"Recurrence": {
"evaluatedRecurrence": {
"frequency": "Month",
"interval": 3,
"timeZone": "India Standard Time"
},
"recurrence": {
"frequency": "Month",
"interval": 3,
"timeZone": "India Standard Time"
},
"type": "Recurrence"
}
}
},
"parameters": {
"$connections": {
"value": {}
}
}
}