I have some properties that are linked together by one common meta-property. So consider this ( it does NOT work - I know that)
CREATE (n:Person { name: 'Andy', title: 'Developer', listKey: [{ inner1: 'Map1' }, { inner2: 'Map2' }] })
The goal is to be able to manipulate this much like a dictionary in python or even a map. I could make them all properties
CREATE (n:Person { name: 'Andy', title: 'Developer', Inner1: 'Map1', Inner2: 'Map2' })
but that rather makes grouping (e.g. listKey) impossible.
This variant (straight up list) didnt work either -
CREATE (n:Person { name: 'Andy', title: 'Developer', listKey: [ inner1: 'Map1', inner2: 'Map2' ] })
While these two are pretty clumsy, they work. But they require the developers to "unpack"
CREATE (n:Person { name: 'Andy', title: 'Developer', listKey: [" inner1: 'Map1", " inner2: 'Map2'"] })
CREATE (n:Person { name: 'Andy', title: 'Developer', listKey: " [ inner1: 'Map1', inner2: 'Map2' ]" })
This works, and the java developers could at least create a Map structure, but makes the pure cypher developers a bit crazed ( not even sure how they would address the values)
CREATE (n:Person { name: 'Andy', title: 'Developer', listKeyN: [" inner1", " inner2"] , listKeyV:['Map1','Map2']})
I've seen some recommendation to add nodes and rel but given that I have 3m nodes, multiplying it by 20 doesn't seem smart. Although I could name the relationships listKey and walk the set.
Any other choices ? Is this something I should be doing in APOC ?
Thanks