title: jQuery select elements which contain specified item in an array data attribute
body: <p>I have an element which I'd like to give a data attribute which contains a series of values, i.e., an <code>Array</code>. Then I'd like to be able to select it based on any of the values in that series. Something like this:</p>
  
  <pre><code>&lt;div id="example" data-my-series='["foo", "bar"]'&gt;&lt;/div&gt;
  </code></pre>
  
  <p>Then I was hoping to select it based on the fact that it has <code>"foo"</code> in it. I'm not really sure how I'd go about it, though. I know I'd do <code>$('div[data-my-series="foo"]')</code> if I wasn't taking this approach, but, obviously that's not the case. Any suggestions?</p>
  
  <p><em>Edit:</em> Also, how can I achieve the inverse of this? i.e., select an element which does <em>not</em> have <code>"foo"</code> in its <code>data-my-series</code>?</p>