Define a variable resulting of the merge of two other variables.

⚙️ Compatible targets: Linux, Windows


prefixThe prefix of the variable name.

This parameter is required.
nameThe variable to define, the full name will be

This parameter is required.
first_variableThe first variable, which content will be overridden in the resulting variable if necessary (written in the form

This parameter is required.
second_variableThe second variable, which content will override the first in the resulting variable if necessary (written in the form

This parameter is required.

Outcome conditions

You need to replace ${name} with its actual canonified value.

  • ✅ Ok: variable_dict_merge_${name}_ok
    • ☑️ Already compliant: variable_dict_merge_${name}_kept
    • 🟨 Repaired: variable_dict_merge_${name}_repaired
  • ❌ Error: variable_dict_merge_${name}_error


method: variable_dict_merge
  first_variable: VALUE
  name: VALUE
  prefix: VALUE
  second_variable: VALUE


To use the generated variable, you must use the form ${[key]} with each name replaced with the parameters of this method.

The resulting variable will be the merge of the two parameters, which means it is built by:

  • Taking the content of the first variable
  • Adding the content of the second variable, and replacing the keys that were already there

It is only a one-level merge, and the value of the first-level key will be completely replaced by the merge.

This method will fail if one of the variables is not defined. See variable_dict_merge_tolerant if you want to allow one of the variables not to be defined.


If you have a prefix.variable1 variable defined by:

{ "key1": "value1", "key2": "value2", "key3": { "keyx": "valuex" } }

And a prefix.variable2 variable defined by:

{ "key1": "different", "key3": "value3", "key4": "value4" }

And that you use:

variablr_dict_merge("prefix", "variable3, "prefix.variable1", "prefix.variable2")

You will get a prefix.variable3 variable containing:

  "key1": "different",
  "key2": "value2",
  "key3": "value3",
  "key4": "value4"