ljharb / qs

A querystring parser with nesting support
BSD 3-Clause "New" or "Revised" License
8.54k stars 728 forks source link

qs parses empty array and returns an array with an additional empty string #512

Closed MorningLit closed 1 month ago

MorningLit commented 1 month ago

image image why does it give the extra empty string ('')? I have to filter to get rid of the empty string

ljharb commented 1 month ago

because there’s always an implicit string there? what else would you expect

MorningLit commented 1 month ago

nvm I need to add {allowEmptyArrays:true} option to parse too 🙈