title: Splitting an array of objects based on unique combinations of two properties
body: <p>For my time-tracking app, I'm storing time entries in an array of objects each looking like this:</p>
  
  <pre><code>{
    date: "20181206",
    hours: "4",
    projectId: "65WchP9X46HlOYUzmWrL",
    taskId: "fJTU7wggJHbg1uRuRUdHjS5mn8J3"
  }
  </code></pre>
  
  <p>I need to group, into separate arrays, all objects by unique combinations of <code>ProjectId</code> - <code>TaskId</code> properties, so that each resulting array gets all entries for one particular project and one particular task (an array for <code>project #1</code> / <code>task #1</code>, another for <code>project #1</code> / <code>task #2</code>, another for <code>project #2</code> / <code>task #1</code>, etc).</p>
  
  <p>I know how to do that with one property, but is there a simple way to achieve the same with two properties?</p>
  
  <p>Note: my global array is initially populated like so:</p>
  
  <pre><code>weekTimes = [];
  querySnapshot.forEach((doc) =&gt; {
    weekTimes.push(doc.data());
  });
  </code></pre>