0
votes

I am pretty new to Cypher. I have a bunch of nodes with the Person label.

Match (n:Person) return n;

returns results like:

Node[21]{title:"Senior Developer",phone:"504-342-2222",email:"stevenson@someco.com",name:"Steve Stevenson"}

I want to change the phone and email properties to be collections, so that you can have multiple phone numbers or emails per person. Is there a Cypher query so that I can change those properties to be collections, and put the current values in the collections for all Person nodes? TIA.

1

1 Answers

2
votes

This should do it:

MATCH (n:Person)
SET n.phone = [n.phone]
SET n.email = [n.email];