Step - branch
branch ยท category: Branches and loops
Routes each traverser by the value its child traversal yields to the matching option().
Forms
branch(arg1: any)
Example
g.v().has_label("person").branch(__.values("age")).option(29, __.values("name")).option(Pick.none, __.constant("other")).to_list() // ["marko", "other", "other", "other"]