Process query strings into nested maps