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(1, 2).branch(__.values("age")).option(29, __.values("name")).option(Pick.none, __.constant("other")).to_list()   // ["marko", "other"]

See also