Map Functions

Qualified Name Type Release

apoc.map.fromNodes

apoc.map.fromNodes(label, property)

Function

APOC Core

apoc.map.fromPairs

apoc.map.fromPairs([[key,value],[key2,value2],…​])

Function

APOC Core

apoc.map.fromLists

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

Function

APOC Core

apoc.map.fromValues

apoc.map.fromValues([key1,value1,key2,value2,…​])

Function

APOC Core

apoc.map.merge

apoc.map.merge(first,second) - merges two maps

Function

APOC Core

apoc.map.mergeList

apoc.map.mergeList([{maps}]) yield value - merges all maps in the list into one

Function

APOC Core

apoc.map.setKey

apoc.map.setKey(map,key,value)

Function

APOC Core

apoc.map.removeKey

apoc.map.removeKey(map,key,{recursive:true/false}) - remove the key from the map (recursively if recursive is true)

Function

APOC Core

apoc.map.removeKeys

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

Function

APOC Core

apoc.map.clean

apoc.map.clean(map,[skip,keys],[skip,values]) yield map filters the keys and values contained in those lists, good for data cleaning from CSV/JSON

Function

APOC Core

apoc.map.groupBy

apoc.map.groupBy([maps/nodes/relationships],'key') yield value - creates a map of the list keyed by the given property, with single values

Function

APOC Core

apoc.map.groupByMulti

apoc.map.groupByMulti([maps/nodes/relationships],'key') yield value - creates a map of the list keyed by the given property, with list values

Function

APOC Core

apoc.map.sortedProperties

apoc.map.sortedProperties(map, ignoreCase:true) - returns a list of key/value list pairs, with pairs sorted by keys alphabetically, with optional case sensitivity

Function

APOC Core

apoc.map.updateTree

apoc.map.updateTree(tree,key,) returns map - adds the {data} map on each level of the nested tree, where the key-value pairs match

Function

APOC Core

apoc.map.values

apoc.map.values(map, [key1,key2,key3,…​],[addNullsForMissing]) returns list of values indicated by the keys

Function

APOC Core

apoc.map.submap

`apoc.map.submap(map,keys,[defaults],[fail=true]) ` - returns submap for keys or throws exception if one of the key doesn’t exist and no default value given at that position

Function

APOC Core

apoc.map.mget

`apoc.map.mget(map,key,[defaults],[fail=true]) ` - returns list of values for keys or throws exception if one of the key doesn’t exist and no default value given at that position

Function

APOC Core

apoc.map.get

apoc.map.get(map,key,[default],[fail=true]) - returns value for key or throws exception if key doesn’t exist and no default given

Function

APOC Core