Enhance parseQuery to handle multiple params with same key