I am trying to convert values to query string.
var obj = { param1: 'test', param2: true, } var str = ""; for (var key in obj) { if (str != "") { str += "&"; } str += key + "=" + obj[key]; } console.log(str);
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
It would be much easier if you would use objects as intended but: