From http://www.developerdrive.com/2013/08/turning-the-querystring-into-a-json-object-using-javascript/