Parse string value pair in javascript
<p>I have an attribute of a list object in html like this:</p>

<pre><code>&lt;ul&gt;
&lt;li id="myID" add-param="{"type1":"myType1","type2":"myType2"}"&gt;Test&lt;/li&gt;
&lt;/ul&gt;
</code></pre>

<p>Having the list item with specified ID, how could I get the value myType1,myType2 by the key type, type2 ?</p>

<p>Thanks.</p>
