I want to be able to create graphs mimicking sql normal forms (linking parent to child entities through foreigh keys), and i don't want to do it column by column.
Hence, i need to be able to create relationships between identically named properties, having identical values. Direction of the relationship to be considered later.
Problem is that i don't know how to access/iterate through "keys" inside a property map (currently using apoc.any.properties(n) to extract all attributes of a node).
So, my query would look like:
considering two node tags "parent" and "child"
for each "parent" node p
for each "child" node c
for each property of p
for each property of c
if c.property name ~= p.property name and if c[property name].value=p[property name].value
then create relationship between p and c
Of course, looks like a horrendous Cartesian product, but the thing i am interested in is marked in bold : how can i iterate through the keys of a map?