merge(a: record, b: record) → record
Category: [records](builtinsrecords)_
Combine two records into one; fields of b win on a name clash.
| Parameter | Type | Description | Remarks |
|---|---|---|---|
| a | record | The base record. | — |
| b | record | The overriding record. | — |
| returns | record | A record with the union of both field sets. | — |
wcl
merge({ host: "localhost", port: 80 }, { port: 8080 }) // the second record wins on the port clash → { host: "localhost", port: 8080 }