title: jQuery selector to get just the first occurrence of every value
body: <p>I have an HTML like this:</p>
  
  <pre><code>&lt;div data-value="a"&gt;&lt;/div&gt;
  &lt;div data-value="b"&gt;&lt;/div&gt;
  &lt;div data-value="c"&gt;&lt;/div&gt;
  &lt;div data-value="d"&gt;&lt;/div&gt;
  &lt;div data-value="a"&gt;&lt;/div&gt;
  &lt;div data-value="d"&gt;&lt;/div&gt;
  &lt;div data-value="e"&gt;&lt;/div&gt;
  </code></pre>
  
  <p>I would like to use jQuery to select all the divs with a <em>different</em> <code>data-value</code> attribute.</p>
  
  <p>Here's my attempt: </p>
  
  <pre><code>$( document ).ready(function() {
      $('div[data-value]').each(function(){
          var value = $(this).data("value");
          console.log(value);
      });
  });
  </code></pre>
  
  <p>This of course will print out all the occurrences: <code>a, b, c, d, a, d, e</code>.</p>
  
  <p>Instead I need to print just the <em>first occurrence</em> of every value: <code>a, b, c, d, e</code>.</p>
  
  <p>Yes, I could use an array to put elements in it and check if it's already in there and do my stuff, but I'm looking for a compact and elegant jQuery code, like a selector or a filter function or something. Any idea?</p>
  
  <p><a href="http://jsfiddle.net/jS29w" rel="nofollow">Fiddle</a></p>