Hi all,
I am trying to store an array of objects in JSON retrieved by using custom connector inside Power Apps. I want to store those values inside a global variable and use it as an Item or value inside different controls (galleries, labels, etc.).
I've applied custom connector operation to OnSelect property of a button:
UpdateContext({varProjectData: GetActiveProjects.getactiveproject({'access-token': "Bearer xxxxxxxxxxxxxxxx", email: "employeemail@testaddress.com"})})
The above formula: I have to provide token inside a header as well as the body parameter (email) in order to retrieve the data. The result should be stored in a variable "varProjectData". Below is the data I am getting as response when testing with Postman or Power Automate:
[
{
"project": "Client Name1: Project Name1 (project-code1)",
"projectmanageremailaddress": "manager1@testaddress.com"
},
{
"project": "Client Name2: Project Name2 (project-code2)",
"projectmanageremailaddress": "manager2@testaddress.com"
},
{
"project": "Client Name3: Project Name3 (project-code3)",
"projectmanageremailaddress": "manager3@testaddress.com"
}
]
Now, I've tried to work with this data inside Power Apps but whatever I try I get errors. In addition, I've found several tutorials and videos explaining how to parse JSON with ParseJSON function when it is in untyped object format, but the problem is that everyone explains how to parse it when the data is already pasted as text inside a label in Power Apps... In my case I have to retrieve the data while the app is in use, store it in a variable and then work with it in real time.
For example, inside the app a manager selects a user for which he wants to see on which projects that particular user is working. After clicking on a button, an API call should be triggered and the data should be retrieved and some labels should be populated with the data (project name and project manager).

I was successful in populating labels when the response was returned as JSON string, but when it is returned as an array of objects I'm having a difficult time figuring out the solution.
Hope someone has an idea how to solve this.
Thank you