apoc.any.properties

Details

Syntax

apoc.any.properties(object [, keys ])

Description

Returns all properties of the given object. The object can be a virtual NODE, a real NODE, a virtual RELATIONSHIP, a real RELATIONSHIP, or a MAP.

Arguments

Name

Type

Description

object

ANY

The object to return properties from.

keys

LIST<STRING>

The keys of the properties to be returned (if null then all keys are returned). The default is: null.

Returns

MAP

Usage examples

The examples in this section are based on the following graph:

CREATE (s:Student {name: 'Alice', score: 71});
CREATE (s:Student {name: 'Mark', score: 95});
CREATE (s:Student {name: 'Andrea', score: 86});
CREATE (s:Student {name: 'Rajesh', score: 89});
CREATE (s:Student {name: 'Jennifer', score: 96});
CREATE (s:Student {name: 'Katarina', score: 80});
Cypher’s properties function
MATCH (s:Student)
RETURN properties({value: s.score}) AS properties
apoc.any.properties
MATCH (s:Student)
RETURN apoc.any.properties({value: s.score}) AS properties
Results
properties

{value: 71}

{value: 95}

{value: 86}

{value: 89}

{value: 96}

{value: 80}