Querystring into a JSON object using JavaScript