In the following example:
CREATE (:A)-[:AB{list:['k1:v1', 'k2:v2']}]->(:B)
CREATE (:A)-[:AB{list:['k2:v2']}]->(:B)
To find path with AB.list having an element k1:v1, I can use the following query:
WITH 'k1:v1' AS query
MATCH path = (:A)-[ab:AB]->(:B) WHERE query IN ab.list RETURN path
The query above uses an exact match in the list, but I only have a prefix k1: to query with. Is there a valid Cypher to achieve something like this?
WITH 'k1:' AS queryPrefix
MATCH path = (:A)-[ab:AB]->(:B) WHERE queryPrefix.* IN ab.list RETURN path