apoc.map.setLists

Function APOC Core

apoc.map.setLists(map,[keys],[values])

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;
Table 1. Results
Output
{
  "name": "Cristiano Ronaldo",
  "country": "Spain",
  "dob": "1986-02-06"
}