Patch JSON or JSON List

This node allows you to modify JSON data objects by using a patch operation on it (i.e. removing, adding, replacing, casting data)

💡
If you’d like to modify every objects of a JSON list use the Patch JSON list node instead.

Imagine you have an ad id object to which you need to add status. Patch JSON is just the right node for that! It allows you to modify JSON data objects by adding, removing or replacing some of the variables. Take a look at the example below to understand better how you can use it:

Example

Notion image

Input Fields

field
schema
explanation
data
any
Input the data that needs to be manipulated in this socket.
value
any
Input the data, which needs to be added to the original object or list. Use this field only if you need to add or replace some of the values.
patches
patches
Set up JSON patches in this field. It can add, cast, copy, move, remove, or replace operations. Specify the path to the field in the data socket that needs to be altered. In the value filed, you can either use the entire value, e.g. {{input.value}} or build messages with multiple dynamic inputs, e.g. "Hi {{input.value/name}}, welcome to {{input.value/company_name}}!”

Output Fields

field
schema
explanation
data
any
Outputs the data object with applied patches.

Video Explanation

Did this answer your question?
😞
😐
🤩

Last updated on February 6, 2023