title: JSON object in data attribute
body: <p>Can we somehow write a JSON string in html data tag attribute?</p>
  
  <p>Then process it in javascript to parse as a normal JSON object.</p>
  
  <p>Example:</p>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;select class="field" data-select="{"firstname":"Jesper","surname":"Aaberg","phone":["555-0100","555-0120"]}"&gt;&lt;/select&gt;
  </code></pre>
  
  <p><strong>JS</strong></p>
  
  <pre><code>var obj = JSON.parse($('form').find('select').attr('data-select'));
  </code></pre>
  
  <p>Solution using single quotes:</p>
  
  <pre><code>&lt;select class="field" data-select='{"firstname":"Jesper","surname":"Aaberg","phone":["555-0100","555-0120"]}'&gt;&lt;/select&gt;
  </code></pre>