so i have a cypher query that returns a json formated values in when using neo4j browser as follows:
Model: Restaurant ->in_plaza->Plaza
Cypher Query:
MATCH r=(p:Plaza)-[:in_plaza]->(rs:Restaurant) WITH COLLECT(r) AS rs CALL apoc.convert.toTree(rs, true, { nodes: {Plaza: ['name'], Restaurant: ['name', 'address']} }) yield value RETURN value
the following are the snapshot of results from neo4j browser
However when i use the api, i get verbose results e.g. unneeded meta data, each record gets wrapped in a row array as follows
The end point i'm using is a post request :
https://----------:7473/db/data/transaction/commit with the query above in the body as follows:
{
"statements": [
{
"statement": "MATCH r=(p:Plaza)-[:in_plaza]->(rs:Restaurant) WITH COLLECT(r) AS rs CALL apoc.convert.toTree(rs, true, { nodes: {Plaza: ['name'], Restaurant: ['name', 'address']} }) yield value RETURN value"
}
]
}