I've got a property quantity
on our Product
-nodes and am looking to do a cypher query that gives me all nodes with quantity = 20
... problem is that quantity is stored as a string in neo4j. Is there a way to cast the property to integer in the cypher query?
// This fails to find the required nodes
MATCH (p:Product) WHERE p.quantity = 20;
// This finds them
MATCH (p:Product) WHERE p.quantity = "20";
// I would like to do this
MATCH (p:Product) WHERE INT(p.quantity) = 20;
PS: this is a really simplified usecase, we don't really have products and quantities but are just faced with existing neo4j data that has integer values stored as strings, and we would like to do some matches on these strings