See this answer. In short, it transforms:
<input type="text" name="object[0][color]" value="red">
<input type="text" name="object[0][doors]" value="2">
<input type="text" name="object[0][color]" value="green">
<input type="text" name="object[0][doors]" value="4>
Into a PHP associative array:
'object' => array(
'0'=>array(
'color'=>'red',
'doors'=>'2'
),
'1'=>array(
'color'=>'green',
'doors'=>'4'
)
)
In Django, I try to do the same, but when I print request.POST, I get:
<QueryDict: {'object[0][color]': ['red'], 'object[0][doors]': ['2'], 'object[1][color]': ['green'], 'object[1][doors]': ['4']}>
How to convert it to a proper dict?