Name

union — Union of 2 maps

Synopsis

map union ( map MAP1 ,
  map MAP2 );
 

Parameters

map MAP1

map MAP2

Return

map

Description

Interprets two maps as sets and returns a new map that has all elements of the first map MAP1and all of the second map MAP2. If elements have identical keys, values from MAP2 overwrite elements from MAP1.

Usage

  union($["a":1, "b":2], $[1:"a", 2:"b"]) -> $[1:"a", 2:"b", "a":1, "b":2]
 

  union($["a":1, "b":2], $["b":10, "c":20]) -> $["a":1, "b":10, "c":20]