DATA FORMAT Flatten JSON function

The DATA FORMAT Flatten JSON function in RPA.

Help CentreFunctions & Formulas

This article describes the RPA Data Format functionality to flatten nested JSON.

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


Description

The Flatten JSON function converts a nested JSON object into a single-level object where keys represent the full path to each value, separated by a configurable separator.


Setting it up

To use the Flatten JSON function, follow these instructions:

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

Once on a process map:

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

Input parameters

ParameterRequiredTypeDefaultDescription
DataYesText-The nested JSON data to flatten
SeparatorNoText.The separator to use between path segments in the flattened keys
VariableNoTextdataVariable name to store the flattened result

Output variables

VariableTypeDescription
{data}ObjectThe flattened single-level JSON object

Errors

ErrorDescription
Invalid JSONThe data is not valid JSON

Tips

  • Useful for transforming nested API responses into flat rows for spreadsheets or databases
  • Change the separator to use underscores or other characters if dots conflict with your data

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.