Skip to content

Instantly share code, notes, and snippets.

@trescenzi
Created September 17, 2012 05:16
Show Gist options
  • Save trescenzi/3735680 to your computer and use it in GitHub Desktop.
Save trescenzi/3735680 to your computer and use it in GitHub Desktop.
function parseGetResponse(response){
var splitUrl = response.split("?")[1].split("&");
var variables = {};
for(var i=0; i<splitUrl.length; i += 1){
var broken = splitUrl[i].split("=");
var key=broken[0];
var value = broken[1];
variables[key] = value;
}
return variables;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment