Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

in neo4j's cypher, is there a way to obtain the property keys of a node?

Tags:

neo4j

cypher

The neo4j manual gives a good example for listing all property keys using the REST API:

:GET /db/data/propertykeys

Can this be achieved by using cypher only? maybe for one specific node as well?

like image 994
ErnestoE Avatar asked Dec 09 '22 04:12

ErnestoE


1 Answers

Since Neo4j 2.2 there's the keys function. Example:

MATCH (n:Person{name:'Ernesto'}) RETURN keys(n) 
like image 154
Stefan Armbruster Avatar answered Dec 10 '22 16:12

Stefan Armbruster