github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/website/content/docs/job-specification/hcl2/functions/collection/merge.mdx (about) 1 --- 2 layout: docs 3 page_title: merge - Functions - Configuration Language 4 description: |- 5 The merge function takes an arbitrary number of maps and returns a single 6 map after merging the keys from each argument. 7 --- 8 9 # `merge` Function 10 11 `merge` takes an arbitrary number of maps and returns a single map that 12 contains a merged set of elements from all of the maps. 13 14 If more than one given map defines the same key then the one that is later 15 in the argument sequence takes precedence. 16 17 ## Examples 18 19 ```shell-session 20 > merge({"a"="b", "c"="d"}, {"e"="f", "c"="z"}) 21 { 22 "a" = "b" 23 "c" = "z" 24 "e" = "f" 25 } 26 ```