var $_GET = {}; (location.search.substr(1)).split('&').map(function(v){$_GET[v.split('=')[0]] = (v.split('=')[1]);}); console.log($_GET);