apoc.map.mergeList
Function
apoc.map.mergeList(maps [Map<String, Value>])
- merges all maps in the given list into one map.
Usage Examples
The following merges multiple maps:
RETURN apoc.map.mergeList([
{name: "Cristiano Ronaldo"},
{dob: date("1985-02-05")},
{country: "Portugal"}
]) AS output;
Output |
---|
|
apoc.map.mergeList
iterates over the list sequentially as it merges.
This means that if the same key is used for different values, the last unique key-value pair in the list will be in the resulting map.
RETURN apoc.map.mergeList([
{name: "Cristiano Ronaldo"},
{dob: date("1985-02-05")},
{profession: "Athlete"},
{profession: "Football player"}
]) AS output;
Output |
---|
|
Was this page helpful?