apoc.map.removeKeys

Details

Syntax

apoc.map.removeKeys(map, keys [, config ])

Description

Removes the given keys from the MAP (recursively if recursive is true).

Arguments

Name

Type

Description

map

MAP

The map to be updated.

keys

LIST<STRING>

The keys to remove from the map.

config

MAP

{ recursive = false :: BOOLEAN } The default is: {}.

Returns

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;
Results
Output
{
  "name": "Cristiano Ronaldo"
}