Overview
The JSONPlus node allows users to extract or compute a custom JSON value from each input item using a user-defined expression. This is useful in scenarios where you need to dynamically generate, transform, or extract specific JSON data based on the input items within your n8n workflow.
Practical examples:
- Extracting a nested property from incoming JSON objects.
- Generating a new JSON structure based on input fields.
- Mapping or transforming input data into a different format for downstream nodes.
Properties
| Name | Meaning |
|---|---|
| Expression | JSON value expression. The user provides an expression (as a string) that defines what value to extract or compute from each input item. |
Output
- The output is a JSON array containing the result of evaluating the provided "Expression" for each input item.
- If there is only one input item, the output will be a single JSON object inside an array.
- In case of errors and if "Continue On Fail" is enabled, the output for that item will include an
errorfield with the error message.
Example output:
[
{ "result": "value from expression" }
]
or, in case of error:
[
{ "error": "Error message here" }
]
Dependencies
- No external services or API keys are required.
- No special n8n configuration is needed.
Troubleshooting
- Common issues:
- Invalid expressions may cause errors for individual items.
- If "Continue On Fail" is not enabled, the node will stop execution on the first error.
- Error messages:
- Errors will appear as
{ "error": "Error message" }in the output if "Continue On Fail" is enabled. - Otherwise, the workflow will fail with the error message.
- Errors will appear as