There appears to be a function called `getQueryStringParameters` that does this decoding for you.