is there an API in py2neo to get random node var

10 views
Skip to first unread message

Yanchun Ni

unread,
Sep 17, 2017, 8:17:54 PM9/17/17
to Neo4j
 graph.data("MATCH(n) return n") 

output:
 {u'n': (ccf5bfa:Person {id:1,name:"Charlie Sheen"})},
 {u'n': (a858741:Person {id:2,name:"Oliver Stone"})},
 {u'n': (f9f8a1f:Person {id:3,name:"Michael Douglas"})},
 {u'n': (e20e33c:Person {id:4,name:"Martin Sheen"})},
 {u'n': (c7040b6:Person {id:5,name:"Morgan Freeman"})}]

Is there any API in py2neo I can get  `ccf5bfa`  `a858741` etc. ?

Michael Hunger

unread,
Sep 17, 2017, 8:21:38 PM9/17/17
to ne...@googlegroups.com
I think those are just python object identifiers.

you should be able to iterate over the records and access them from there.

Michael

--
You received this message because you are subscribed to the Google Groups "Neo4j" group.
To unsubscribe from this group and stop receiving emails from it, send an email to neo4j+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages