How to use the ParseJSON function in Power Apps to convert data
When building a Power App, it is sometimes the case that you must work with data of a format that cannot be directly handled or recognized by the platform. This is particularly the case when connecting your app to Power Automate flows or other external connectors, which often return data in a JSON format. In these scenarios, the “ParseJSON” function will help you interpret and digest this raw data, and use it to create Tables, Collections and Variables.
It is important to note that the ParseJSON function, first and foremost, is a way to interpret and respect the structure of an inbound JSON object, and its direct output is what is referred to as an ‘Untyped Object’. In plain terms, this denotes a generic data structure that is unaware of the specific types of data it contains, and therefore cannot be directly used without further interpretation.
The parseJSON functionality was introduced in 2022 to parse JSON strings into Power Fx objects and types. It is the first, and for now the only function to return an untyped object.
Microsoft defines Untyped Objects as follows:
An Untyped object is a data type in Power Fx that can hold any data structure, complex or simple. It can’t be used directly in any Power App that we create and requires explicit conversion to the required data type before processing. Fields in records in an untyped object can be accessed using the dot notation, and existence of fields is only verified at runtime.
Example where we face untyped objects in Power Apps:
A very common scenario is where we want to fetch items from our data source using Power Automate and return the value to Power Apps for further processing.
The response is sent back to Power Apps using the action ‘Respond to Power Apps.’
Advantages of using this action:
- Not a premium connector
Disadvantages of using this action:
- Response only supports the following data types: Text, Number, Yes/No, File & Date
Hence, we can’t send responses with complex data structures e.g., Table/ Collection of various datatypes.
Use the ParseJSON function in Power Apps to process complex data structures
The ‘ParseJSON’ function in PowerApps can parse JSON strings into Power Fx objects and different data types and simplifies working with JSON in Canvas apps.
There are two major steps to achieving this:
- Send a response to Power Apps in a JSON string format from flow.
- Activate and use the ParseJSON function in Power Apps and JSON string to convert to a collection of data.
STEP 1: Send a response to Power Apps in a JSON string format from flow
- Open Power Automate and select ‘PowerApps’ as a trigger for the flow:

2. Select ‘Get Items’ as your next action – From your SharePoint list. We can also have our filters in place to optimise.
Note: In case you have more than 5000+ items in SharePoint list, we shall be using $batch apis -> Send HTTP request to SharePoint as an action.
Find more information on $batch calls here.

3. Click on the + and choose ‘Select’ as your next action. – This is a major step as it is important how we send our response back to Power Apps. Here we are sending it as a string. This step will format our string in JSON which we can manipulate later in Power Apps to generate a table.

4. Select the ‘Compose – Items’ action – This is an additional step to manage the datatype of the pervious step’s output.

5. Respond to Power App or flow – Use the outputs from ‘Compose – Items’ as a response to send back to Power Apps.

STEP 2: Activate and use ‘ParseJSON’ function in Power Apps and convert JSON string to a collection of data.
- Activate the “Preview feature” -> “ParseJSON” from the Power App settings in your application.

2. Once the feature is activated, we can now use the ‘ParseJSON’ function to convert the simple string response into a table with relevant data types.
Below you can find the syntax for converting an untyped object to a typed object using ParseJSON.
Example: Write the set of lines on ‘OnStart’ of the application.

CODE Sample:
ClearCollect(
colRequestItems,
ForAll(
Table(ParseJSON(WorkspaceRequestItems.Run().response) ),
{
ID: Value(Value.ID),
SiteTitle: Text(Value.SiteTitle),
WorkspaceType:Text(Value.WorkspaceType),
ProvisioningStatus: Text(Value.ProvisioningStatus),
SiteUrl: Text(Value.SiteUrl),
Created:Text(DateTimeValue(Value.Created), “mmm dd yyyy”)
}
)
);
CODE Explanation:
a. Create a collection of items named ‘colRequestItems’
b. Run the Power Automate flow using this formula -> Flowname.Run()
- . response -> will get the response from the flow
- ParseJSON -> will convert the string into JSON format
- Table -> will convert the JSON structure into a table format that we define
c. As the gallery control will always accept a table data type in its item property, we need to format the JSON into a table structure as follows:
{
ID: Value(Value.ID),
SiteTitle: Text(Value.SiteTitle),
WorkspaceType:Text(Value.WorkspaceType),
ProvisioningStatus: Text(Value.ProvisioningStatus),
SiteUrl: Text(Value.SiteUrl),
Created:Text(DateTimeValue(Value.Created), “mmm dd yyyy”)
}
d. Set the property -> item of gallery control to the collection variable we created at onload of the app as follows.
We can then see that all the items are pre-loaded in the gallery control without even scrolling to the end.
Then use this collection variable in filter/ search formulas to manipulate the gallery items instead of the original SharePoint data source.

To get more information about ParseJSON and untyped objects follow Microsoft’s documentation here.