FIlter the list with a condition in Neo4J

Viewed 57

Suppose I have a table of this sort

| Type                    | Name           | Status   |
| --------                | -------------- | -------- |
| ["Thriller" , "Horror"] | Conjuring      | Released | 
| ["Action" , "Thriller"] | Evil Dead      | Released |
| ["Drama" , "Thriller"]  |   XYZ          | Released |

I want to retrieve the rows that are not Thriller. In other words I want to do something like Type.filter(item => item != "Thriller") How can I do this in Neo4J?

Expected Result

| Type     | Name           | 
| -------- | -------------- |
| "Horror" | Conjuring      |     
| "Action" | Evil Dead      |      
| "Drama"  |   XYZ          |
3 Answers

I could fix this feature using this piece of cypher query

RETURN DISTINCT [x in Type WHERE x <> "Thriller"][0] as Type

Related