Step - has_id

has_id · hasId · category: Filters

Keeps elements whose id is one of the given ids (ids are strings, see the book page Id Arguments).

Forms

has_id(arg1: any)
has_id(arg1: array)
has_id(arg1: any, arg2: any)
has_id(arg1, …, arg10)

Example

g.v().has_id(1, 2).values("name").to_list()   // ["marko", "vadas"]

See also