body-parser icon indicating copy to clipboard operation
body-parser copied to clipboard

Problem with array parsing

Open viniciusbo opened this issue 11 years ago • 3 comments

Hi, When I post <input name="order[1]" value="0"> it gets parsed as { order: [ '0' ] } instead of { order: ['', '0'] }, when there is no input named order[0]. Have been trying to track it down, but I'm not sure if this issue is related to body-parser or raw-body package. Any thoughts on this?

viniciusbo avatar Aug 18 '15 18:08 viniciusbo

It would be from the Qs module, which does the parsing for urlencoded bodies.

dougwilson avatar Aug 18 '15 18:08 dougwilson

https://github.com/hapijs/qs

dougwilson avatar Aug 18 '15 18:08 dougwilson

I see. Just found #40 which is the same as I'm facing. Sorry for the duplicate.

viniciusbo avatar Aug 18 '15 18:08 viniciusbo