allowEmptyArrays option was intruduced in version 6.12.0
Without this option
qs.stringify({ foo: [], bar: baz })
// 'bar=baz'
With this option
qs.stringify({ foo: [], bar: baz }, { allowEmptyArrays: true })
// 'foo[]&bar=baz'
However, I believe that with arrayFormat: 'comma' option, it should result like this:
qs.stringify({ foo: [], bar: baz }, { allowEmptyArrays: true, arrayFormat: 'comma' })
// 'foo=&bar=baz'
allowEmptyArraysoption was intruduced in version 6.12.0parse/stringify: addallowEmptyArraysoption to allow [] in object values #487Without this option
With this option
However, I believe that with
arrayFormat: 'comma'option, it should result like this: