parse query string as object and array like php does