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.

Equivalent of apoc.export.json.data that returns rather than saving to a file

is there a way to do the equivalent of apoc.export.json.data but returning the json rather than saving it to a file?

E.g.

MATCH (n:Movie)
WITH collect(n) as a
CALL apoc.export.json.data(a, [], "../../../../../../../../Desktop/Movie-Nodes.json", null)
YIELD nodes, relationships, properties, file, source,format, time
RETURN *

or

MATCH (:Movie)-[r]-()
WITH collect(r) as b
CALL apoc.export.json.data([], b, "../../../../../../../../Desktop/Movie-Relationships.json", null)
YIELD nodes, relationships, properties, file, source,format, time
RETURN *
1 REPLY 1

Not 100% sure but I think you pass null as filename and {stream:true} as config map it should return the json. Try:

call apoc.export.json.all(null, {stream:true})