How to set a comma sep. string as a paramter?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/901115/how-can-i-get-query-string-values">How can I get query string values?</a>  </p>
</blockquote>



<p>ive a a function call like:</p>

<pre><code>var ex = _.where(obj, {param1:0,param2:1});
</code></pre>

<p>which works fine, all the code behind.</p>

<p>I check my URL and take out the parameters and save this information into a array:</p>

<pre><code>    var query = window.location.search.substring(1);

    var vars = query.split("&amp;");

    var testParamter = vars.toString().replace( /=/g,':' );
</code></pre>

<p>that return by using console.log(testParamter); the following result:</p>

<pre><code>param1:0,param2:1
</code></pre>

<p>but i cant insert yet the var testParamter into my function call:</p>

<pre><code>var ex = _.where(obj, {testParamter});
</code></pre>

<p>because it is a string and i cant handel it with eval(). so can anyone tell me please the right way to solve it?</p>

<p>thanks</p>
