singh30
singh30

Reputation: 1503

Gremlin collect all first level Vertices if the second level vertex has a specific property

My graph looks something like

enter image description here

From A, I need to collect all the B i.e. B1, B2,..BN which are connected to C and C has a specific property value.

Upvotes: 1

Views: 114

Answers (1)

Kelvin Lawrence
Kelvin Lawrence

Reputation: 14371

Without having actual data this may not be quite right but I think you are looking for something like this:

g.V().hasLabel('A').
  out().hasLabel('B').
  where(out().hasLabel('C').has('someprop','somevalue'))

Upvotes: 2

Related Questions