JavaScript: querystring to json object