title: Parse json attribute
body: <p>In an intranet app I have HTML elements with custom tags.
  There are several types of tags, data-mem is one example.
  In the markup it looks like this: </p>
  
  <pre><code>&lt;a href="something.html" data-mem='{varname: "value", varname2: "value"}'&gt;Bla Bla&lt;/a&gt;
  </code></pre>
  
  <p>What I want to do is get the json attribute and use the name/value pairs in a JS method call. Note: both names and values are unknown and dynamic and I'm using jquery.</p>
  
  <pre><code>RegEvent('varname','values','varname2','value');
  </code></pre>
  
  <p>What I have done up till now is get the list of all  tags containing a data-mem attribute:</p>
  
  <pre><code>var objs = $('a[data-mem]');
  </code></pre>
  
  <p>I'm a little lost now. Don't really know how to continue.
  Any suggestions?</p>
  
  <p>Thank you!</p>