apoc.map.setLists
Function
apoc.map.setLists(map Map<String, Any>, keys [String], values [Any])
- adds or updates the given keys/value pairs provided in list format (e.g. [key1, key2],[value1, value2]) in a map.
== Signature
apoc.map.setLists(map :: MAP?, keys :: LIST? OF STRING?, values :: LIST? OF ANY?) :: (MAP?)
Input parameters
Name | Type | Default |
---|---|---|
map |
MAP? |
null |
keys |
LIST? OF STRING? |
null |
values |
LIST? OF ANY? |
null |
Usage Examples
The following updates a key in a map:
RETURN apoc.map.setLists(
{name:"Cristiano Ronaldo",country:"Portugal",dob:date("1985-02-05")},
["dob", "country"],
[date("1986-02-06"), "Spain"]
) AS output;
Output |
---|
|
Was this page helpful?