functions/merge: Added expanation for example

Co-authored-by: Laura Pacilio <83350965+laurapacilio@users.noreply.github.com>
This commit is contained in:
Dirk Leser 2022-06-17 14:32:02 +02:00 committed by GitHub
parent 707f39b440
commit 37d18f4229
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -27,14 +27,7 @@ type structure of the attributes after the merging rules have been applied.
}
```
```
> merge([{a="b", c="d"}, {}, {e="f", c="z"}]...)
{
"a" = "b"
"c" = "z"
"e" = "f"
}
```
The following example uses the expansion symbol (...) to transform the value into separate arguments. Refer to [Expanding Function Argument](/language/expressions/function-calls#expanding-function-arguments) for details.
```
> merge({a="b"}, {a=[1,2], c="z"}, {d=3})