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 *