The following:
qs.parse('a[2]=2&a[999999999]=1')
results in the following
{ a: { '0': undefined, '1': undefined, '2': '2', '999999999': '1' } }
Since 0 and 1 were actually holes in the array (i.e. !(0 in arr)), they should not have properties created from them in the object. I would expect:
{ a: { '2': '2', '999999999': '1' } }
which is the output if you had them backwards: qs.parse('a[999999999]=1&a[2]=2')
TL;DR I think qs.parse('a[2]=2&a[999999999]=1') should have the same resulting object (with the same existing properties) as qs.parse('a[999999999]=1&a[2]=2').
The following:
results in the following
Since 0 and 1 were actually holes in the array (i.e.
!(0 in arr)), they should not have properties created from them in the object. I would expect:which is the output if you had them backwards:
qs.parse('a[999999999]=1&a[2]=2')TL;DR I think
qs.parse('a[2]=2&a[999999999]=1')should have the same resulting object (with the same existing properties) asqs.parse('a[999999999]=1&a[2]=2').