Retrieve JSON data from a hidden input
<p>I store JSON data in HTML hidden fields on the server side. Then I'd like to retrieve that data using Javascript and JQuery on the client side. The problem is that I get a JSON string instead of a JSON object.</p>

<p>This is my code on the server side:</p>

<pre><code>&lt;form id="data" style="display: none;"&gt;
    &lt;input id="channels" type="hidden" tal:attributes="value python: view.context['ChannelManager'].toJSON(view.channels.values())" /&gt;
    &lt;input id="mediaGroups" type="hidden" tal:attributes="value python: view.context['MediaGroupManager'].toJSON(view.mediaGroups.values())" /&gt;
&lt;/form&gt;
</code></pre>

<p>This is my code on the client side:</p>

<pre><code>copy.channelList = new ChannelTest();
copy.channelList.fromJSONObjectAll($("#data input[id=channels]").val())
</code></pre>

<p>So I get JSON string instead of JSON object from this, $("#data input[id=channels]").val().</p>

<p>How could I get JSON object without converting JSON string in JSON object?</p>

<p>Thanks in advance!</p>
