How do I from a JSON object convert to form of elements?
<p>I have a JSON object as <code>{a: 1, b: 2, c: [4, 5, 6], d: {x: 7, y: 8, z: [9, 0]}}</code>, how do I convert it to a form of elements?</p>

<p>I want to convert to this:</p>

<pre><code>&lt;input type="hidden" name="obj[a]" value="1"/&gt;
&lt;input type="hidden" name="obj[b]" value="2"/&gt;
&lt;input type="hidden" name="obj[c][]" value="4"/&gt;
&lt;input type="hidden" name="obj[c][]" value="5"/&gt;
&lt;input type="hidden" name="obj[c][]" value="6"/&gt;
&lt;input type="hidden" name="obj[d][x]" value="7"/&gt;
&lt;input type="hidden" name="obj[d][y]" value="8"/&gt;
&lt;input type="hidden" name="obj[d][z][]" value="9"/&gt;
&lt;input type="hidden" name="obj[d][z][]" value="0"/&gt;
</code></pre>

<p>Any ideas?</p>
