loops
Get the number of times a query has gone through a particular loop.
Synopsis
loops()
Description
The loops()
step is a map step that extracts the number of times the traverser has gone through the current loop.
Examples
g.V().hasLabel('person','name','John Doe'). repeat(out('knows').dedup(). aggregate('x'). by(project('person','level'). by('name'). by(loops()) ) ). until(__.not(out('knows').simplePath())). cap('x').next()