DATA FORMAT Set JSON function

The DATA FORMAT Set JSON function in RPA.

Help CentreFunctions & Formulas

This article describes the RPA Data Format functionality to set a value in JSON data.

For a full list of available functions, please read DATA FORMAT functions.


Description

The Set JSON function sets a value at a specified path in JSON data. If intermediate keys do not exist, they are created automatically.


Setting it up

To use the Set JSON function, follow these instructions:

{{popups:rpas/add:action=json-set}}

Once on a process map:

  1. Navigate to the process where you would like to add the Set 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 Set JSON option
  5. Click "Add" once you are done

Input parameters

ParameterRequiredTypeDefaultDescription
DataYesText-The JSON data to modify (string or variable)
PathYesText-Dot-notation path where the value should be set
ValueYesText-The value to set at the specified path
VariableNoTextdataVariable name to store the modified JSON

Output variables

VariableTypeDescription
{data}AnyThe modified JSON data with the value set

Errors

ErrorDescription
Invalid JSONThe data is not valid JSON
Invalid pathThe specified path is not valid

Tips

  • Intermediate keys are created automatically if they do not exist
  • Use this to build JSON payloads dynamically for API calls

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.