How to Parse JSON in Power Apps [10 Practical Examples]

If you’ve worked with Power Apps and Power Automate for even a short time, you’ve probably run into JSON. And honestly, the first time I saw JSON in Power Apps, it felt confusing.

But once I understood how to work with it, it became one of the most powerful tools in my apps.

In this guide, I’ll walk you through how to parse JSON in Power Apps step by step, starting from very basic examples and moving toward real-world scenarios like:

  • Reading JSON strings
  • Accessing nested values
  • Converting JSON into collections
  • Handling arrays
  • Getting data from Power Automate and converting it into usable tables

What is JSON?

JSON (JavaScript Object Notation) is just a structured way to store data.

{
  "Name": "John",
  "Age": 30,
  "Department": "HR"
}

Think of it like a record in Power Apps.

Important Function You’ll Use

This is the main function we use.

ParseJSON(jsonString)

It converts JSON text into a Power Apps object.

Parse JSON in Power Apps

Let’s discuss some practical examples of working with Parse JSON in Power Apps.

Example 1: Parse a Simple JSON Object in Power Apps

Here is the sample JSON:

{
  "Name": "Jessica",
  "Role": "Developer"
}

In Power Apps, add that json string into the ParseJson() function and store that in a global variable using the Power Apps Set() function.

Set(varJSON, ParseJSON("{""Name"":""Jessica"",""Role"":""Developer""}"))

Access values:

Text(varJSON.Name)
Text(varJSON.Role)

Important: Always wrap string values within Text() when displaying.

ParseJSON function in power apps

Example 2: Working with Numbers in Power Apps

JSON:

{
  "Salary": 50000
}

Power Apps Code:

Set(varJSON, ParseJSON("{""Salary"":50000}"))

Access:

Value(varJSON.Salary)

Use Power Apps Value() for numbers.

How to parse JSON in Power Apps

Example 3: Working with Boolean Values in Power Apps

Here is the JSON that contains Boolean values:

{
  "IsActive": true
}

Power Apps Code:

Set(varJSON, ParseJSON("{""IsActive"":true}"))

Access the boolen value in Power Apps:

Boolean(varJSON.IsActive)
access boolean value from json in power apps

Example 4: Working with Nested JSON in Power Apps (Very Important)

JSON:

{
  "Employee": {
    "Name": "David",
    "Department": "IT"
  }
}

Power Apps Code:

Set(varJSON, ParseJSON("{""Employee"":{""Name"":""David"",""Department"":""IT""}}"))

Access:

Text(varJSON.Employee.Name)
Text(varJSON.Employee.Department)
power apps json function

This is super common in real apps.

Example 5: JSON Array (List of Records) in Power Apps

JSON:

[
  {"Name": "A", "Age": 25},
  {"Name": "B", "Age": 30}
]

Power Apps Code:

Set(varJSON, ParseJSON("[{""Name"":""A"",""Age"":25},{""Name"":""B"",""Age"":30}]"))

Convert to Power Apps Collection:

Set(varJSON, ParseJSON("[{""Name"":""A"",""Age"":25},{""Name"":""B"",""Age"":30}]"));
ClearCollect(
colEmployees,
ForAll(
varJSON,
{
Name: Text(ThisRecord.Name),
Age: Value(ThisRecord.Age)
}
)
)

Key concept:

  • ThisRecord is required when looping JSON arrays.
powerapps parse json to collection

Example 6: Display JSON Data in Power Apps Gallery

After Example 5:

Set the Power Apps Gallery Items property with the below collection name:

colEmployees

Inside Gallery:

  • Label 1 → ThisItem.Name
  • Label 2 → ThisItem.Age

Now you’ve converted JSON into UI-ready data.

Display JSON Data in Power Apps Gallery

Example 7: Parse Complex Nested Array JSON in Power Apps

JSON:

{
  "Employees": [
    {"Name": "A", "Skills": ["Power Apps", "Power Automate"]},
    {"Name": "B", "Skills": ["SharePoint"]}
  ]
}

Power Apps Code:

Set(varJSON, ParseJSON("{""Employees"":[{""Name"":""A"",""Skills"":[""Power Apps"",""Power Automate""]},{""Name"":""B"",""Skills"":[""SharePoint""]}]}"))

Convert JSON into Power Apps Collection:

ClearCollect(
    colEmployees,
    ForAll(
        varJSON.Employees,
        {
            Name: Text(ThisRecord.Name),
            Skills: Concat(
                ForAll(
                    ThisRecord.Skills,ThisRecord
                ),
                Value,
                ", "
            )
        }
    )
)

The Power Apps Concat() function is useful for arrays inside arrays.

parse complex nested array json in power apps

Example 8: Parse JSON from Power Automate (Most Important)

This is what most people struggle with.

  1. Create a Power Automate Flow that returns JSON like this:
[
  {
    "Title": "Task 1",
    "Status": "Completed"
  },
  {
    "Title": "Task 2",
    "Status": "Pending"
  }
]

Use the Respond to Power Apps action and pass it as text.

  1. Call Flow in Power Apps
Set(varResponse, YourFlow.Run())
  1. Parse JSON
Set(varParsed, ParseJSON(varResponse))
  1. Convert to Collection
ClearCollect(
    colTasks,
    ForAll(
        varParsed,
        {
            Title: Text(ThisRecord.Value.Title),
            Status: Text(ThisRecord.Value.Status)
        }
    )
)

This is the real-world scenario you’ll use daily.

Example 9: JSON with Null Values in Power Apps

JSON:

{
  "Name": "John",
  "Manager": null
}

Handle Safely:

If(
IsBlank(varJSON.Manager),
"No Manager",
Text(varJSON.Manager)
)

Always handle nulls to avoid errors.

parse json null value power apps

Example 10: Dynamic JSON (Unknown Structure)

Sometimes you don’t know the schema.

Trick:

Set(varJSON, ParseJSON(yourJsonString))

Then inspect using:

JSON(varJSON)

This helps debug the structure.

parse unknown json structure in power apps

Best Practices (Very Important for Real Apps)

Here’s what I personally follow:

1. Always Convert Types Properly

  • Text → Text()
  • Number → Value()
  • Boolean → Boolean()

2. Use Collections for UI

Don’t bind raw JSON directly. Always convert to:

ClearCollect()

3. Keep JSON Clean in Power Automate

  • Avoid deeply nested structures
  • Flatten data when possible

4. Use Meaningful Column Names

Instead of:

{ "col1": "value" }

Use:

{ "EmployeeName": "John" }

5. Debug Smartly
Use:

JSON(variable)

to understand structure.

Common Mistakes (I made these too)

  • Forgetting Text() → shows blank values
  • Not using ThisRecord.Value inside arrays
  • Passing complex objects directly from Flow
  • Not handling null values
  • Trying to bind JSON directly to the gallery

Final Thoughts

Parsing JSON in Power Apps feels tricky at first, but once you understand:

  • ParseJSON()
  • ForAll()
  • ThisRecord.Value
  • ClearCollect()

…everything starts to click.

If you’re building apps with Power Automate, this is a must-have skill.

Also, you may like:

Power Apps functions free pdf

30 Power Apps Functions

This free guide walks you through the 30 most-used Power Apps functions with real business examples, exact syntax, and results you can see.

Download User registration canvas app

DOWNLOAD USER REGISTRATION POWER APPS CANVAS APP

Download a fully functional Power Apps Canvas App (with Power Automate): User Registration App