Custom Search Param Serialization
That’s the array JSON-encoded into a single query param value. What I’d like instead is the more standard repeated-keys format:
I tried following the docs with query-string:
I'm using zod to validate search params in my routes:
But the problem is that the value passed into stringifySearchWith isn’t an array. Instead I’m seeing objects with only number–value pairs like
{0: "DNK", 1: "FIN"}. That means they end up in the URL as ?country=0%3DFIN. I don’t even have access to the original key.This break my validation logic where array is expected:
What’s the recommended way in TanStack Router to produce repeated query keys (?country=DNK&country=FIN) and parse them back into arrays for search params? Any help here would be appreciated