I am trying to make a tag system using Neo4j Cypher and having a very hard time (spent the last twelve hours banging my head) to making a recursive function.
Let's say an array of property is given.
The recursive function will: 1. first check if the root has a node relationship [:b] with a node that has property 'name' value as the first element in the array.
a. If yes, simply set the root to the next element and check if the next node has property 'name value as the second element in the array
b. Else, create a new node with the property and set that node as the root.