Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions pages/advanced-algorithms/available-algorithms/map.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -171,16 +171,18 @@ RETURN map.from_pairs([["b", 3], ["c", "c"]]) AS map;
### `merge()`

The procedure merges two maps into one. If the same key occurs twice, the later
value will overwrite the previous one.
value will overwrite the previous one.

If null is provided as an argument, it will resolve to an empty map.

<Callout type="info">
This function is equivalent to **apoc.map.merge**.
</Callout>

{<h4 className="custom-header"> Input: </h4>}

- `first: Map` ➡ A map containing key-value pairs that need to be merged with another map.
- `second: Map` ➡ The second map containing key-value pairs that need to be merged with the key-values from the first map.
- `first: mgp.Nullable[Map]` ➡ A map containing key-value pairs that need to be merged with another map.
- `second: mgp.Nullable[Map]` ➡ The second map containing key-value pairs that need to be merged with the key-values from the first map.

{<h4 className="custom-header"> Output: </h4>}

Expand Down