Merger
Last updated
Last updated
[data/dictionary/Merger]
Merges dictionary b
to dictionary a
. Values of a
will be ignored on key conflict.
Frequently used to apply default values to record fields.
Example:
{ "first": 1, "third": 0 }@0 received via a
{ "third": 3, "fifth": 5 }@0 received via b
merged
sends { "first": 1, "third": 3, "fifth": 5 }@0
More: https://github.com/Cranq-io/cranq-tutorials/tree/main/reference/2_constructing_data/2_4_merge_concat
Keywords: dictionary, dict, merge, union
a: {string: any}
Receives the dictionary to merge onto. Example: { "first": 1, "third": 0 }
b: {string: any}
Receives the dictionary to merge with. Example: { "third": 3, "fifth": 5 }
merged: ({string: any} and {string: any})
Sends the resulting merged dictionary. Example: { "first": 1, "third": 3, "fifth": 5 }