Hello!
I have set up a simple flow that returns the following JSON:
[
{
"id": "Wakefield.7",
"partitionKey": "Italy",
"Country": "Italy",
"parents": [
{
"familyName": "Wakefield",
"firstName": "Robin"
},
{
"familyName": "Miller",
"firstName": "Ben"
}
],
"children": [
{
"familyName": "Merriam",
"firstName": "Jesse",
"gender": "female",
"grade": 8,
"pets": [
{
"givenName": "Goofy"
},
{
"givenName": "Shadow"
}
]
},
{
"familyName": "Miller",
"firstName": "Lisa",
"gender": "female",
"grade": 1
}
],
"address": {
"state": "NY",
"county": "Manhattan",
"city": "NY"
},
"isRegistered": false,
"_rid": "OftWAObFzHYDAAAAAAAAAA==",
"_self": "dbs/OftWAA==/colls/OftWAObFzHY=/docs/OftWAObFzHYDAAAAAAAAAA==/",
"_etag": "\"00003401-0000-3200-0000-67a111f00000\"",
"_attachments": "attachments/",
"_ts": 1738609136
}
]
The sample is an array, which I seem to struggle displaying in PowerApps.
I tried adding a Text Input field, and pasting the JSON in there, then displaying that in a Gallery, and that seems to be working just fine by adding this to the Items of the gallery:
Table(ParseJSON(TextInput.Text))
However, when I try to get the items from a flow, I am facing a bit of an issue, and I am not quite understanding how I can manage to display these items in a gallery.
ClearCollect(myCollection, GetAllItems.Run()) gives me an error saying "JSON parsing error, expected 'object' but got 'array'"
Then I tried doing
ClearCollect(myCollection, Table(Getallitems.Run()))
That gives me a table in my PowerApps variables, but when I add myCollection to the items of the gallery, and then try to display the id in a label, I get the same JSON parsing error.
How can I display the data in this JSON array in a Gallery?