apoc.any.propertyFunction
Syntax |
|
||
Description |
Returns the property for the given key from an object.
The object can be a virtual |
||
Arguments |
Name |
Type |
Description |
|
|
The object to return a property from. |
|
|
|
The key of the property to return. |
|
Returns |
|
||
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 property access operator
MATCH (s:Student)
RETURN {value: s.score}.value AS score
apoc.any.property
MATCH (s:Student)
RETURN apoc.any.property({value: s.score}, "value") AS score
| score |
|---|
71 |
95 |
86 |
89 |
96 |
80 |