apoc.map.setPairs
Function
apoc.map.setPairs(map Map<String, Any>, pairs [[key Any, value Any]])
- adds or updates the given key/value pairs (e.g. [key1,value1],[key2,value2]) in a map.
Usage Examples
The following updates a key in a map:
RETURN apoc.map.setPairs(
{name:"Cristiano Ronaldo",country:"Portugal",dob:date("1985-02-05")},
[ ["dob", date("1986-02-06")],
["country", "Spain"]
]
) AS output;
Output |
---|
|
Was this page helpful?