I have a list of objects, the objects have different properties.
array = [{name: 'Armen', age: 26}, {name: 'Alex', profession: 'Scientist'}]
I need to iterate over list and create nodes with properties provided by objects. Which is the easiest and best practice way to do it? Thanks in advance! I have tried to use unwind both for list and object keys
WITH array AS nodes
UNWIND nodes AS node
UNWIND keys(node) AS prop
WITH node, prop
MERGE (man: Man {prop:node[prop]})
RETURN man
but in this case I get one node for each property.