json-merge
The json-merge transform combines multiple upstream JSON payloads into one object. Inputs are merged in runtime order; only values that parse as JSON participate (objects by default).
When to use it
Use json-merge to assemble configuration fragments, API responses, or transform outputs from parallel branches before json-template, json-filter, or dashboard nodes.
Limitations
- Does not publish dashboards or
$heat-dataservicepayloads. - Arrays are ignored unless
allowArraysis true (shallow: last array wins; deep: replace or concat perarrayMergeMode). - Scalars are skipped unless
includeNonObjectJsonwraps them underscalarWrapKey. - With
outputWhenNoValidJson: fail, the node fails when no input parses; default is an empty object{}.
Configuration (summary)
| Property | Default | Description |
|---|---|---|
mode | shallow | shallow or deep nested object merge |
allowArrays | false | Allow JSON arrays as inputs |
arrayMergeMode | replace | replace or concat when allowArrays and mode: deep |
includeNonObjectJson | false | Wrap scalars as { "value": ... } |
parseMode | strict | strict or lenient (trim embedded JSON strings) |
outputWhenNoValidJson | emptyObject | emptyObject or fail |
Example
{
"mode": "deep",
"allowArrays": false
}