title: Error in reading an array assigned to Data- in Jquery. I am using .data()
body: <p>I have the following HTML generated on the server through an AJAX call. Of course there is a lot more than this but the following line is relevant:</p>
  
  <pre><code> &lt;div id="mydiv" DATA-mylist='[ [0,0],  [1,0],  [4,1],  [6,1],  [7,1], ]'&gt;...&lt;/div&gt;
  </code></pre>
  
  <p>I need to extract the <strong>array</strong> assigned to DATA-mylist and assign it to a property as in:</p>
  
  <pre><code> $('#somediv').mywidget({
       prop1 : 45, //For example
       arr_prop : $('#mydiv').data('mylist') 
   });
  </code></pre>
  
  <p>Here arr_prop expects an array. It is not getting one. I get the following error:</p>
  
  <pre><code>  Uncaught TypeError: Cannot use 'in' operator to search for '12' in [ [0,0], ..
  </code></pre>
  
  <p>I tried a few things to get it to work, other than using the .attr() method instead of .data() which I think is not the right approach anyway. I am possibly missing something very basic somewhere. Please help!</p>