Closed 43081j closed 5 months ago
Fixes #42
Essentially we had two bugs :eyes:
Bug 1: if you have repeat syntax when using bracket-notation, but only had one key, we would not create it as an array.
For example:
parse('foo[]=1', opts); // {foo: 1} - wrong! parse('foo[]=1&foo[]=2', opts); // {foo: [1, 2]} - right!
Bug 2: if you have repeat syntax following an index-nested member, we would not parse it correctly.
parse('foo[bar][]=1', opts); // {foo: {bar: 1}} - wrong! // expected: {foo: {bar: [1]}}
These should both now be fixed.
cc @thedevminertv
Fixes #42
Essentially we had two bugs :eyes:
Bug 1: if you have repeat syntax when using bracket-notation, but only had one key, we would not create it as an array.
For example:
Bug 2: if you have repeat syntax following an index-nested member, we would not parse it correctly.
For example:
These should both now be fixed.
cc @thedevminertv