var search = location.search.substring(1);
JSON.parse('{"' + decodeURI(search).replace(/"/g, '"').replace(/&/g, '","').replace(/=/g,'":"') + '"}')
var search = location.search.substring(1);
JSON.parse('{"' + search.replace(/&/g, '","').replace(/=/g,'":"') + '"}', function(key, value) { return key===""?value:decodeURIComponent(value) })
JSON.parse('{"' + decodeURI("abc=foo&def=%5Basf%5D&xyz=5".replace(/&/g, "","").replace(/=/g,"":"")) + '"}')