I am having trouble finding a complete working code example for apoc.export.json.data.
It seems like the MATCH query could be used to retrieve any graph:
MATCH g=(someNode)-[someRel]-() RETURN g
CALL apoc.export.json.data( g )
Hopefully, this APOC function would generate JSON containing all the nodes and edges in the dataset based on the query. The expected JSON format is:
{
nodes:[
{ id:a1a1 , labels:[Something] , prop_a:99 },
{ id:a2a2 , labels:[Something] , prop_a:77 },
{ id:a3a3 , labels:[User] , prop_a:33 }
],
edges:[
{ id:a1a1 , labels:[OWNS] , prop_a:99 },
{ id:a2a3 , labels:[OWNS] , prop_a:77 },
{ id:a4a5 , labels:[HAS] , prop_a:33 }
]
}