Step - tree
tree ยท category: Aggregation
Builds a tree map of the paths the traversers took (modulated by by()); with a key it is a side effect (see the book page tree("key") as a Side Effect).
Forms
tree()
tree(arg1: string)
Example
g.v(1).out("knows").tree().by("name").next() // #{"marko": #{"josh": #{}, "vadas": #{}}}