1 | initial version |
You can remove specific nodes from a list of values using the not
step in a Gremlin query. Here's an example query:
g.V().hasLabel('person').values('name').not('Alice', 'Bob')
In this query, g.V().hasLabel('person').values('name')
retrieves the list of all person
vertices' name
property values. The not('Alice', 'Bob')
step filters out the values 'Alice'
and 'Bob'
from the list.
Note that this query only filters out values from the list and does not remove nodes from the graph. If you want to remove nodes from the graph, you can use the drop()
step after filtering the nodes.