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

Example

{ "mode": "deep", "allowArrays": false }