Help Centre › Functions & Formulas
This article describes the RPA Data Format functionality to delete a key from JSON data.
For a full list of available functions, please read DATA FORMAT functions.
Description
The Delete JSON key function removes a key and its value from JSON data at the specified path.
Setting it up
To use the Delete JSON key function, follow these instructions:
{{popups:rpas/add:action=json-delete}}
Once on a process map:
- Navigate to the process where you would like to add the Delete JSON key 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 Delete JSON key option
- Click "Add" once you are done
Input parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| Data | Yes | Text | - | The JSON data to modify (string or variable) |
| Path | Yes | Text | - | Dot-notation path to the key to delete |
| Variable | No | Text | data | Variable name to store the modified JSON |
Output variables
| Variable | Type | Description |
|---|---|---|
| {data} | Any | The modified JSON data with the key removed |
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 json-query to verify the key exists before deleting
- Useful for removing sensitive fields before logging or forwarding data