We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
With the following code
qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'comma' }) // 'a=b,c'
plus some option, I want to obtain a result that looks like
// 'a=[b,c]'
How can I do this?
The text was updated successfully, but these errors were encountered:
That’s not the comma format, so I’m not sure how you can.
What server expects that format??
Sorry, something went wrong.
well it doesn't need to be the comma format then, but it needs to be that format
binance
oof, so binance basically just invented their own format instead of using the universal ones that already exist?
I'm not sure how to do that with qs; perhaps with a custom encoder?
You can use filter.
qs.stringify(params, { filter: (prefix, value) => { if (Array.isArray(value)) return `[${value.join(',')}]` return value }, })
No branches or pull requests
With the following code
plus some option, I want to obtain a result that looks like
How can I do this?
The text was updated successfully, but these errors were encountered: