cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! Site migration is underway. Phase 2: migrate recent content

javascript neo4j-driver, the proper way to extract results

francois
Node

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