apoc.map.removeKeys

Function

apoc.map.removeKeys(map MAP<STRING, ANY>, keys LIST<STRING>, config MAP<STRING, ANY>) - removes the given keys from the MAP (recursively if recursive is true).

Signature

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

Input parameters

Name Type Default

map

MAP

null

keys

LIST<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"
}