DATA FORMAT Query JSON function

The DATA FORMAT Query JSON function in RPA.

Help CentreFunctions & 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:

  1. Navigate to the process where you would like to add the Query JSON function
  2. Click on the green button’s drop-down (right side of the green button labelled “Process”)
  3. On the menu that appears, click on the “+ Activity” item
  4. From here you can select the DATA FORMAT Query JSON option
  5. Click "Add" once you are done

Input parameters

ParameterRequiredTypeDefaultDescription
DataYesText-The JSON data to query (string or variable)
PathYesText-Dot-notation path to the value (e.g. users.0.name)
VariableNoTextresultVariable name to store the result

Output variables

VariableTypeDescription
{result}AnyThe value at the specified path

Errors

ErrorDescription
Invalid JSONThe data is not valid JSON
Path not foundThe 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

Related functions

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or go live in 7 days.