Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Getting the Latest Array Item in Logic App
{
...
"List_Backups": {
"type": "ApiConnection",
"runAfter": {},
"inputs": {
"method": "get",
"host": {
"connection": {
"name": "@parameters('$connections')['azureblob']['connectionId']"
}
},
"path": "/datasets/default/foldersV2/@{encodeURIComponent(encodeURIComponent('/backup'))}",
"queries": {
"nextPageMarker": "",
"useFlatListing": false
}
}
},
...
}
{
...
"Take_Latest_Backup": {
"type": "Query",
"runAfter": {
"Select_Filenames_from_Backups": [
"Succeeded"
]
},
"inputs": {
"from": "@body('List_Backups')?['value']",
"where": "@equals(int(first(split(item()?['Name'], '.'))), max(body('Select_Filenames_from_Backups')))"
}
},
...
}
{
...
"Select_Filenames_from_Backups": {
"type": "Select",
"runAfter": {
"List_Backups": [
"Succeeded"
]
},
"inputs": {
"from": "@body('List_Backups')?['value']",
"select": "@int(first(split(item()?['Name'], '.')))"
}
},
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.