Possible Duplicate:
How can I get query string values?
ive a a function call like:
var ex = _.where(obj, {param1:0,param2:1});
which works fine, all the code behind.
I check my URL and take out the parameters and save this information into a array:
var query = window.location.search.substring(1);
var vars = query.split("&");
var testParamter = vars.toString().replace( /=/g,':' );
that return by using console.log(testParamter); the following result:
param1:0,param2:1
but i cant insert yet the var testParamter into my function call:
var ex = _.where(obj, {testParamter});
because it is a string and i cant handel it with eval(). so can anyone tell me please the right way to solve it?
thanks