title: How to exclude/skip items from sorting?
body: <p>There is an array of objects, which I need to be sorted. It looks like this:</p>
  
  <pre><code>var array = [
      {left: 20, top: 50, group: 'groupOne'},
      {left: 18, top: 10, group: 'groupTwo'},
      {left: 15, top: 15, group: 'groupThree'},
      {left: 25, top: 30, group: 'groupThree'},
      {left: 18, top: 25, group: 'groupFour'},
      {left: 28, top: 25, group: 'groupFive'},
      {left: 25, top: 15, group: 'groupSix'},
      {left: 30, top: 30, group: 'groupSix'}
  ];
  </code></pre>
  
  <p>I want to sort it by <strong>left</strong> (primarily) and <strong>top</strong> (secondly). My sort function looks like this:</p>
  
  <pre><code>array.sort((x, y) =&gt; {
      return x.left - y.left || x.top - y.top;
  });
  </code></pre>
  
  <p>The result is:</p>
  
  <pre><code>[
      {left: 15, top: 15, group: "groupThree"},
      {left: 18, top: 10, group: "groupTwo"},
      {left: 18, top: 25, group: "groupFour"},
      {left: 20, top: 50, group: "groupOne"},
      {left: 25, top: 15, group: "groupSix"},
      {left: 25, top: 30, group: "groupThree"},
      {left: 28, top: 25, group: "groupFive"},
      {left: 30, top: 30, group: "groupSix"}
  ];
  </code></pre>
  
  <p>Sorting fuction works almost exactly how I wanted, but it would be better if it also consider the <strong>group</strong> if there is more than one item of the same group.</p>
  
  <p>In other words I want final result to look like below:</p>
  
  <pre><code>[
      {left: 15, top: 15, group: "groupThree"},
      {left: 25, top: 30, group: "groupThree"},
      {left: 18, top: 10, group: "groupTwo"},
      {left: 18, top: 25, group: "groupFour"},
      {left: 20, top: 50, group: "groupOne"},
      {left: 25, top: 15, group: "groupSix"},
      {left: 30, top: 30, group: "groupSix"}
      {left: 28, top: 25, group: "groupFive"},
  ];
  </code></pre>
  
  <p>Items from the same group "stick" together.
  Any ideas?</p>