apoc.map.removeKeys

Function APOC Core

apoc.map.removeKeys(map,[keys],{recursive:true/false}) - remove the keys from the map (recursively if recursive is true)

Signature

apoc.map.removeKeys(map :: MAP?, keys :: LIST? OF STRING?, config = {} :: MAP?) :: (MAP?)

Input parameters

Name Type Default

map

MAP?

null

keys

LIST? OF STRING?

null

config

MAP?

{}

Usage Examples

The following removes keys from a map:

RETURN apoc.map.removeKeys(
    {name:"Cristiano Ronaldo",country:"Portugal",dob:date("1985-02-05")},
    ["dob", "country"]
) AS output;
Table 1. Results
Output
{
  "name": "Cristiano Ronaldo"
}