title: How can I sort elements with same value
body: <p>For example:</p>
  <pre><code>&lt;div id=&quot;aphaOrder&quot;&gt;
      &lt;div class=&quot;value&quot;  data-key=&quot;key1&quot;&gt;olark&lt;/div&gt;   
      &lt;div class=&quot;value&quot;  data-key=&quot;key1&quot;&gt;snapengage&lt;/div&gt; 
      &lt;div class=&quot;value&quot;  data-key=&quot;key1&quot;&gt;helponclick&lt;/div&gt;
      &lt;div class=&quot;value&quot;  data-key=&quot;key2&quot;&gt;hangouts&lt;/div&gt;
      &lt;div class=&quot;value&quot;  data-key=&quot;key2&quot;&gt;atlass&lt;/div&gt; 
      &lt;div class=&quot;value&quot;  data-key=&quot;key3&quot;&gt;hipchat&lt;/div&gt;   
      &lt;div class=&quot;value&quot;  data-key=&quot;key3&quot;&gt;chat hip&lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  <p>I want to keep only those divs whose <code>data-key</code> attribute is &quot;key1&quot;, other ones should be removed.
  I don't know how to start. I think I should use append to &quot;aphaOrder&quot; but ...
  Sorry for bad English...</p>