Skip to Content
This documentation is provided with the HEAT environment and is relevant for this HEAT instance only.

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-dataservice payloads.
  • Arrays are ignored unless allowArrays is true (shallow: last array wins; deep: replace or concat per arrayMergeMode).
  • Scalars are skipped unless includeNonObjectJson wraps them under scalarWrapKey.
  • With outputWhenNoValidJson: fail, the node fails when no input parses; default is an empty object {}.

Configuration (summary)

PropertyDefaultDescription
modeshallowshallow or deep nested object merge
allowArraysfalseAllow JSON arrays as inputs
arrayMergeModereplacereplace or concat when allowArrays and mode: deep
includeNonObjectJsonfalseWrap scalars as { "value": ... }
parseModestrictstrict or lenient (trim embedded JSON strings)
outputWhenNoValidJsonemptyObjectemptyObject or fail
emitContentMd5falseOpt-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.
settleSeconds0Opt-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 }