apoc.any.properties

Function APOC Core

returns properties for virtual and real, nodes, rels and maps

Signature

apoc.any.properties(thing :: ANY?, keys = null :: LIST? OF STRING?) :: (MAP?)

Input parameters

Name Type Default

thing

ANY?

null

keys

LIST? OF STRING?

null

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});

If we create virtual nodes containing students scores, we can use apoc.any.properties to return the properties of those virtual nodes:

MATCH (s:Student)
CALL apoc.create.vNode(['Score'],{value: s.score})
YIELD node
RETURN apoc.any.properties(node) AS properties;
Table 1. Results
properties

{value: 71}

{value: 95}

{value: 86}

{value: 89}

{value: 96}

{value: 80}