const data = ["asd", null, "123", ""]
console.log(
queryString.stringify(
{ a: data },
{
arrayFormat: "index",
sort: false,
}
)
)
//a[0]=asd&a[1]&a[2]=123&a[3]=
//correct
console.log(
queryString.stringify(
{ a: data },
{
arrayFormat: "comma",
sort: false,
}
)
)
//a=asd,123
//incorrect
arrayFormat: "comma" isn't working properly. We're expecting a=asd,,123, as we're not skipping null nor "".
arrayFormat: "comma"isn't working properly. We're expectinga=asd,,123,as we're not skippingnullnor"".