Looping through object properties of an array and comparing : <p>I've got an array of objects containing several properties, looking something like this:</p>

<p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
<div class="snippet-code">
<pre class="snippet-code-js lang-js prettyprint-override"><code>[
  {
    "title" = "Test",
    "prop1" = 4,
    "prop2" = 6
  },
  {
    "title" = "Test2",
    "prop1" = 5,
    "prop2" = 7
  },
  {
    "title" = "Test",
    "prop1" = 6,
    "prop2" = 14
  }
]</code></pre>
</div>
</div>
</p>

<p>What I want to do, is…</p>

<ul>
<li>looping through the objects</li>
<li>comparing the title, to only have one output per title later on</li>
<li>sum up the properties of the objects with the same title</li>
</ul>

<p>So in the end my output would be something like…</p>

<ul>
<li>Test, 10, 20</li>
<li>Test2, 5, 7</li>
</ul>

<p>I tried to store values in variables, comparing these variables, but this only worked for two sets of data and in my case there can be also five, ten or 15 sets of data with the same title.</p>

<p>Any help appreciated, thanks! :)</p>

<p><em>Additional information: I need to access the properties by name, like</em> <code>data[1]['title']</code></p>
