Step - has

has ยท category: Filters

Keeps elements that have the property (and, with a value or predicate, whose value matches, a string operand being a value, never a path label; with a traversal, for whose value the traversal yields a result, like filter(__.values(key)...)); with T.id or T.label first it tests the id or label; the 3-argument form also tests the label.

Forms

has(arg1: any)
has(arg1: By, arg2: any)
has(arg1: any, arg2: any)
has(arg1: string, arg2: any, arg3: any)

Example

{ [g.v().has("person", "age", P.gt(30)).count().next(), g.v().has("name", __.to_lower().is("josh")).count().next(), g.v().has(T.label, __.is("software")).count().next()] }   // [2, 1, 2]

See also