apoc.map.clean
Syntax |
|
||
Description |
Filters the keys and values contained in the given |
||
Arguments |
Name |
Type |
Description |
|
|
The map to clean. |
|
|
|
The list of property keys to be removed. |
|
|
|
The list of values to be removed. |
|
Returns |
|
Usage Examples
The following removes empty string values from a map:
RETURN apoc.map.clean({name: "Cristiano Ronaldo", club: ""}, [], [""]) AS output;
Output |
---|
|
The following removes empty string values and the keys dob
and country
from a map:
RETURN apoc.map.clean(
{name:"Cristiano Ronaldo",country:"Portugal",dob:date("1985-02-05"), club: ""},
["dob", "country"],
[""]
) AS output;
Output |
---|
|