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

Community site session details

Session Id :
Power Apps - Power Apps Pro Dev & ISV
Unanswered

How to Dynamically Process Nested JSON in Power Apps Without Predefined Schema?

(2) ShareShare
ReportReport
Posted on by 1

I am working on a Power Apps application where I need to handle data returned from an API dynamically. The API response contains nested JSON objects, arrays, and sometimes objects within arrays. The challenge is that the structure of the JSON can change over time, making it impractical to hardcode field names or manually map properties.

Here are two examples of the API response structures I receive:

Example 1:

{
  "content": [
    {
      "name": "Marywood University",
      "alpha_two_code": "US",
      "domains": ["marywood.edu"],
      "country": "United States",
      "web_pages": ["https://www.google.com"],
      "state-province": null
    },
    {
      "name": "Lindenwood University",
      "alpha_two_code": "US",
      "domains": ["lindenwood.edu"],
      "country": "United States",
      "web_pages": ["https://www.google.com"],
      "state-province": null
    }
  ]
}

Example 2:

{
  "results": [
    {
      "gender": "female",
      "name": {
        "title": "Ms",
        "first": "Jessica",
        "last": "Perry"
      },
      "location": {
        "street": {
          "number": 8932,
          "name": "Manor Road"
        },
        "city": "Kilcoole",
        "state": "Meath",
        "country": "Ireland"
      },
      "email": "jessica.perry@example.com"
    }
  ]
}

I need to dynamically process this data in Power Apps without hardcoding field names, while still accommodating changes in the API's response format.
 
The Method I try is:
  1. Tried Flattening in Power Apps:

    • I used functions like ParseJSON, Table, and ForAll to dynamically extract the properties of the JSON. However, Power Apps lacks native support for iterating over object properties or handling arrays within nested JSON dynamically.
  2. Tried Key-Value Pair Mapping:

    • I attempted to extract key-value pairs from the JSON using nested ForAll loops, but encountered errors like Name isn't valid or Text function has invalid arguments when processing dynamic fields like PropertyName and PropertyValue.

Expected Outcome:
I want to create a solution where Power Apps can dynamically process JSON data (including nested objects and arrays), regardless of the structure, and display it in a gallery or collection without requiring manual adjustments each time the API changes.

 
I have the same question (0)

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Chiara Carbone – Community Spotlight

We are honored to recognize Chiara Carbone as our Community Spotlight for November…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 652 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 410 Super User 2025 Season 2

#3
developerAJ Profile Picture

developerAJ 236

Last 30 days Overall leaderboard