cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

javascript neo4j-driver, the proper way to extract results

So I run this simple request:

const res = await session.run('MATCH p=(t:Account {account_id: '123598'})-[]-(j) return count(j)')
 
And to catch the count I have to dig:
const count = res.records[0]._fields[0].low

 It feels I'm doing it the wrong way, I mean it will work but doesn't look great. 

Is this the way to go or did I miss better way to get the result/count ?

0 REPLIES 0
Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online