Form return array instead of object


#1

Hello,

I have a form like that :

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

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 item.id isn’t over 21 it return me an array instead :
[ 0, 0 ]

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

I’m confused…