Search code examples
javasetgremlintinkerpop

Gremlin check if a Set attribute contains a value


I have a vertex with a Set attribute and a graph traversal e.g.

graph.traversal().V().hasId(id)

the returned vertex has a set attribute and I need to check if it contains a specific value


Solution

  • .has("myProp", __.unfold().is("myVal"))