DATA FORMAT Merge JSON function

The DATA FORMAT Merge JSON function in RPA.

Help CentreFunctions & Formulas

This article describes the RPA Data Format functionality to merge two JSON objects.

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


Description

The Merge JSON function merges two JSON objects together. When keys conflict, the override object wins. With deep merge enabled, nested objects are merged recursively.


Setting it up

To use the Merge JSON function, follow these instructions:

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

Once on a process map:

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

Input parameters

ParameterRequiredTypeDefaultDescription
BaseYesText-The base JSON object
OverrideYesText-The JSON object to merge into the base (wins on conflicts)
DeepNoBooleantrueWhether to merge nested objects recursively
VariableNoTextdataVariable name to store the merged result

Output variables

VariableTypeDescription
{data}ObjectThe merged JSON object

Errors

ErrorDescription
Invalid JSONOne or both inputs are not valid JSON

Tips

  • The override object wins on key conflicts
  • Set deep to true to merge nested objects recursively instead of replacing them

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.