title: jQuery get data as object or array
body: <p>I would like to get all elements with class <code>.my-data-tid</code> and <code>data-tid</code> values into an object or array</p>
  
  <pre><code>&lt;div class="my-data-tid" data-tid="1"&gt;1&lt;/div&gt;
  &lt;div class="my-data-tid" data-tid="2"&gt;2&lt;/div&gt;
  &lt;div class="my-data-tid" data-tid="3"&gt;3&lt;/div&gt;
  &lt;div class="my-data-tid" data-tid="4"&gt;4&lt;/div&gt;
  </code></pre>
  
  <p>with</p>
  
  <pre><code>var tid = $('.my-data-tid').data('tid');
  </code></pre>
  
  <p>I get only the first value</p>