title: How to use MERGE for array properties?
body: <p>In my neo4j database, I've nodes containing an array, e.g. an array of names, e.g.:</p>
  <pre><code>CREATE (:Group {names: ['Ben', 'James']})
  </code></pre>
  <p>Finally, I can use the following query to find all nodes that contains 'Ben' in the names array:</p>
  <pre><code>MATCH (n:Group) WHERE 'Ben' IN n.names RETURN n
  </code></pre>
  <p>So far everything is fine. But now I want to create a new node if there's no node with <code>Ben</code> inside. So what I'm looking for is any function or something like this I can use in the <code>MERGE</code> command to create a new node if there's no node with <code>Ben</code> in the names array. Something like this:</p>
  <pre><code>MERGE (:Group {names: contains('Ben')})
  </code></pre>
  <p>The idea is that executing the <code>MERGE</code>, tries to find any node with Ben in the &quot;names&quot; array and if there's no such node, it creates a new one.</p>
  <p>Does anyone know if there's something like this available in cypher?</p>