Form return array instead of object



I have a form like that :

<form method="post" action="/post">
    @each(item in items)
        <input name="items[{{}}]">
    <button type="submit">submit</button>

And I want it to return me an object like this:
{ 1 : 0, 2: 0 }
I don’t know why but if one of the isn’t over 21 it return me an array instead :
[ 0, 0 ]

And when I have a over 21 it’s working as expected

I’m confused…