web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Store Complex JSON in ...
Power Apps
Answered

Store Complex JSON in collection

(0) ShareShare
ReportReport
Posted on by 51

Hello experts,

 

I have data in complex JSON format, i want to store all address in Collection, which reside under resourceSets -> resources -> value 

 

{
"authenticationResultCode": "",
"brandLogoUri": "",
"copyright": "",
"resourceSets": [
{
"estimatedTotal": 1,
"resources": [
{
"__type": "",
"value": [
{
"__type": "LocalBusiness",
"address": {
"countryRegion": "Norway",
"locality": "Oslo",
"adminDistrict": "Oslo",
"countryRegionIso2": "Nw",
"addressLine": "City Road",
"formattedAddress": "City Road"
},
"name": "City BT"
},
{
"__type": "LocalBusiness",
"address": {
"countryRegion": "Norway",
"locality": "Oslo",
"adminDistrict": "Oslo",
"countryRegionIso2": "Nw",
"addressLine": "BT Station Road",
"formattedAddress": "BT Station Road"
},
"name": "City Bus"
}
]
}
]
}
],
"statusCode": 200,
"statusDescription": "OK",
"traceId": ""
}

 

 

How can i achieve this, please help!

 

Thanks.

Categories:
I have the same question (0)
  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @sachinsoni ,

    Do you want to parse the JSON data within your app, and then retrieve the address attribute into a collection?

    How do you get the JSON data? Using Custom connector?

     

    If you want to  parse the JSON data within your app, and then retrieve the address attribute into a collection, I afraid that there is no way to achieve your needs in PowerApps currently.

     

    Currently, within PowerApps, there is no function supported to parse a JSON data. If you would like this feature to be added in PowerApps, please submit an idea to PowerApps Ideas Forum:

    https://powerusers.microsoft.com/t5/Power-Apps-Ideas/idb-p/PowerAppsIdeas

     

    As an alternative solution, I think the combination of Power Automate and Power Apps could achieve your needs. You could consider fire a flow from your canvas app, then parse the JSON data (JSON String value) within the flow, then retrieve the desired table value and return back to your canvas app.

     

    I have made a test on my side, please take a try with the following workaround:

    Flow's configuration:

    6.JPG

    Within the "Initialize variable" action, Value field set to following (the JSON String value you mentioned above😞

    {"authenticationResultCode":"","brandLogoUri":"","copyright":"","resourceSets":[{"estimatedTotal":1,"resources":[{"__type":"","value":[{"__type":"LocalBusiness","address":{"countryRegion":"Norway","locality":"Oslo","adminDistrict":"Oslo","countryRegionIso2":"Nw","addressLine":"City Road","formattedAddress":"City Road"},"name":"City BT"},{"__type":"LocalBusiness","address":{"countryRegion":"Norway","locality":"Oslo","adminDistrict":"Oslo","countryRegionIso2":"Nw","addressLine":"BT Station Road","formattedAddress":"BT Station Road"},"name":"City Bus"}]}]}],"statusCode":200,"statusDescription":"OK","traceId":""}

    Within the "Response" action, Body field set to following expression:

    json(variables('JSONString'))?['resourceSets'][0]?['resources'][0]?['value']

    The "Response Body JSON Schema" field set to following:

    {
     "type": "array",
     "items": {
     "type": "object",
     "properties": {
     "__type": {
     "type": "string"
     },
     "address": {
     "type": "object",
     "properties": {
     "countryRegion": {
     "type": "string"
     },
     "locality": {
     "type": "string"
     },
     "adminDistrict": {
     "type": "string"
     },
     "countryRegionIso2": {
     "type": "string"
     },
     "addressLine": {
     "type": "string"
     },
     "formattedAddress": {
     "type": "string"
     }
     }
     },
     "name": {
     "type": "string"
     }
     },
     "required": [
     "__type",
     "address",
     "name"
     ]
     }
    }

     

    App's configuration:

     

    7.JPG

    Firstly, you need to add your above flow connection into your canvas app, then bind it to the "FireFlowToParse" button. Set the OnSelect property of the "FireFlowToParse" button to following:

    ClearCollect(ReturnedResult,'PowerApp->Initializevariable,Response'.Run());
    Clear(AddressCollection);
    ForAll(
     ReturnedResult,
     Collect(AddressCollection, address)
    )

    The AddressCollection would be populated with proper records as below:

    8.JPG

    Please consider take a try with above solution, check if the issue is solved.

     

    If the JSON data you mentioned is from your custom connector, you could consider add the custom connector action in your flow to send HTTP request, then try above solution, returned desired table value back to your canvas app.

     

    Best regards,

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 329 Most Valuable Professional

#2
11manish Profile Picture

11manish 209 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 179

Last 30 days Overall leaderboard