Help Centre › Functions & Formulas
This article describes the RPA Data Format functionality to query a value from JSON data.
For a full list of available functions, please read DATA FORMAT functions.
Description
The Query JSON function retrieves a value from JSON data using dot-notation path syntax. You can navigate nested objects and arrays to extract specific values.
Setting it up
To use the Query JSON function, follow these instructions:
{{popups:rpas/add:action=json-query}}
Once on a process map:
- Navigate to the process where you would like to add the Query JSON function
- Click on the green button’s drop-down (right side of the green button labelled “Process”)
- On the menu that appears, click on the “+ Activity” item
- From here you can select the DATA FORMAT Query JSON option
- Click "Add" once you are done
Input parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| Data | Yes | Text | - | The JSON data to query (string or variable) |
| Path | Yes | Text | - | Dot-notation path to the value (e.g. users.0.name) |
| Variable | No | Text | result | Variable name to store the result |
Output variables
| Variable | Type | Description |
|---|---|---|
| {result} | Any | The value at the specified path |
Errors
| Error | Description |
|---|---|
| Invalid JSON | The data is not valid JSON |
| Path not found | The specified path does not exist in the data |
Tips
- Use numeric indices for arrays (e.g. users.0.name to get the first user's name)
- Paths are case-sensitive