How to implement something like PHP's http_build_query and the reverse in javascript?
<pre><code>&lt;?php
$data = array('foo'=&gt;'bar',
              'baz'=&gt;'boom',
              'cow'=&gt;'milk',
              'php'=&gt;'hypertext processor');

echo http_build_query($data);
/* Output：
      foo=bar&amp;baz=boom&amp;cow=milk&amp;php=hypertext+processor
*/
</code></pre>

<p>How to do similar thing in javascript,say, get the <strong>query string</strong> from the <strong>array</strong> ,and convert the <strong>array</strong> to <strong>query string</strong>?</p>

<p><strong>UPDATE</strong></p>

<p>the jquery plugin is not working:</p>

<pre><code>var fromVar = $.query.load('?cow=milk')
fromVar.set('first', 'value'); 
fromVar.toString()
</code></pre>

<p>It outputs <code>?cow=milk</code> while I want it to be <code>?cow=milk&amp;first=value</code></p>
