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.
Please start posting anonymously - your entry will be published after you log in or create a new account. This space is reserved only for answers. If you would like to engage in a discussion, please instead post a comment under the question or an answer that you would like to discuss
Asked: 2023-06-10 23:28:34 +0000
Seen: 22 times
Last updated: Jun 10 '23
How can one generate a list by using a portion of another list?
How can Swagger V3 use Schema Annotation to transform a List of Long to look like a List of String?
How can I modify the width of the column filter in an R shiny datatable?
How can dote be eliminated from the menu items in HTML?
How can an EditForm validate a list object in MudBlazor?
How do you update a dataframe within a for loop in R after passing a list?
How can resetting a list be avoided during a loop?
What is the LINQ query to retrieve the employee with the second highest salary?