interested javascript

www.javascriptkit.com

 

stackoverflow.com

 

var obj = {
    "version" : "22",
    "who" : "234234234234"
};


var str = Object.keys(obj).map(function(key){ 
  return encodeURIComponent(key) + '=' + encodeURIComponent(obj[key]); 
}).join('&');

console.log(str); //"version=22&who=234234234234"