ArangoDB/AQL: projecting graph traversal results in tree format

82 views Asked by At

How do you write an AQL to project graph traversal result in JSON tree format?

For example. NamedGraph-"ExampleGraph"

A -> B -> C

A -> B -> D -> E

A -> F -> R

Expected Result: 

{
   A: "data",
   children: [{
      B: "data",
      children: [
         { C: "data", children : []}, { D: "data" , children [{E}]}
      ]
   }, {F..}]
}
0

There are 0 answers