
Hi there,
I have a Power Automate flow which returns a JSON array from a DevOps connector. The end of the flow uses the Response action 200 to push the output into the app.
In my canvas app, I am collecting the JSON array data and triggering the flow as below:
ClearCollect(listTeams, 'ListTeamswithinProject'.Run(Dropdown.Selected.id))
I want then parse this JSON within 'listTeams' collection to just retrieve three elements into a new collection table - "name", "id" and "url". How can I achieve this last step?
The schema for the JSON is
{
"type": "object",
"properties": {
"value": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"url": {
"type": "string"
},
"description": {
"type": "string"
},
"identityUrl": {
"type": "string"
},
"projectName": {
"type": "string"
},
"projectId": {
"type": "string"
}
},
"required": [
"id",
"name",
"url",
"description",
"identityUrl",
"projectName",
"projectId"
]
}
},
"count": {
"type": "integer"
}
}
}
Ultimately, the "name" column of this collection table will be used in a dropdown/combobox later in the canvas app.
In my dropdown, I have tried setting the Items to 'listTeams', but I can only access count or value. I have tried listTeams.value.name but this errors out?
Thanks
K.
If you are only using the data for the dropdown the best way to do that would be to use a Data Select in the flow to select only those three columns before returning the data. That would give you the data you need and improve performance by shrinking the size of the array you are returning.