title: Javascript - Combine a list of objects if the have same property
body: <p>I have an array of objects like this :</p>
  <pre><code>[
   {
       &quot;event&quot; : {
           &quot;teams&quot;: &quot;bla bla&quot;,
       }
   },
   {
       &quot;event&quot; : {
           &quot;teams&quot;: &quot;bla bla&quot;,
       }
   },
  ]
  </code></pre>
  <p>How to combine all events that have the same teams value into one array like this:</p>
  <pre><code>[
    {
        &quot;event&quot; : [
            {
                &quot;teams&quot; : &quot;bla bla&quot;
            },
            {
                &quot;teams&quot;: &quot;bla bla&quot;
            },
        ]
     }
   ]
  </code></pre>
  <p>I can only use lodash</p>