tj / node-querystring

querystring parser for node and the browser - supporting nesting (used by Express, Connect, etc)
MIT License
455 stars 66 forks source link

Failed to parse key with square brackets mixed with dots #95

Open nevill opened 10 years ago

nevill commented 10 years ago

The expected result of qs.parse('a=1.2&b[0].c=3') should be

 { a: '1.2', 'b[0].c': '3' }

In fact we get

{ a: '1.2', b: { '0].': '3' } }

Just for a note, stringify works well

> qs.stringify({ a: '1.2', 'b[0].c': '3' })
'a=1.2&b%5B0%5D.c=3'