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 |
emitContentMd5 | false | Opt-in. Publish through an explicit upload with the merged bytes’ md5 on the output configuration. Core API skips rescheduling children on a byte-identical republish only when the producer stamped md5; the default return path never does, so every upstream tick re-runs every consumer of the merge (on a 9-parent merge feeding a 100KB+ Arbex dashboard script this dominated ingest). Bytes and destination are unchanged: the node dataSourceName, else the runner default store. |
settleSeconds | 0 | Opt-in. Wait until no parent has changed its current output for this many seconds (capped at 60) before merging, so a fan-in burst becomes one publish instead of one per parent. Pair with emitContentMd5: the follow-up run Core schedules then finds identical bytes and completes without publishing, so consumers run once per quiet period. |
Example
{
"mode": "deep",
"allowArrays": false
}Related
Opens your browser's print dialog. Choose "Save as PDF" as the destination.