Recursively flattens an object or array into URL search parameters.
This function handles nested objects and arrays by converting them into dot-notation query parameters. It supports different types of parameters:
The URLSearchParams object to modify
The parameter to flatten (can be an object, array, or primitive)
Optional key for nested parameters, used for creating dot-notation keys
Recursively flattens an object or array into URL search parameters.
This function handles nested objects and arrays by converting them into dot-notation query parameters. It supports different types of parameters: