Exporting Neo4j paths so that they are importable in networkx

Hi all,

I have a tree in Neo4j from which I need to export some subtrees.
I need to export each subtree in format that can be read in networkx library. After some research, I ended up using two apoc procedures, one to get a subtree and the other to export to JSON. The problem is that the apoc procedure I'm using to get the subtrees returns a "path" object. This object can be visualized in neo4j-browser and I can export it to a JSON string. However, I don't know how to deal with these paths. How to convert these Neo4j paths in a format networkx can read?

Thats the query I'm using:

WITH "MATCH (p:Area {name: 'UGH'}) 
	  CALL apoc.path.expandConfig(p, {
      relationshipFilter: '<SON_OF', 
      minLevel: 1,
      maxLevel: 4,
      bfs: false,
      limit: 10
      YIELD path RETURN path" as query
CALL apoc.export.json.query(query, null, {stream: true})
YIELD path

and the result is a string like that:


Thanks in advance for any help