How to build a query string with JQuery
<p>I have the following code that builds a query string:</p>

<pre><code>    var name = $(this).next()[0].name;
    var value = $(this).next()[0].checked;
    var str = name+'&amp;value='+value;
</code></pre>

<p>and outputs an array on my server like this:</p>

<pre><code>[value] =&gt; false
</code></pre>

<hr>

<p>What I would like to have is something more like this:</p>

<pre><code>array(
    [myInputName] =&gt; value
)
</code></pre>

<p>How can I achieve this?</p>
