title: Django APIView data format from AJAX
body: <p>I was trying to send an array of objects in <code>views.py</code> using APIView to insert multiple rows in 1 post request. This is my JavaScript data format:</p>
  <pre class="lang-js prettyprint-override"><code>const data = {
          group_designation: [
              {id: 1},
              {id: 2},
              {id: 3},
          ]
      }
  </code></pre>
  <p>I run an insomnia app and it only accepts this kind of format:</p>
  <pre class="lang-json prettyprint-override"><code>{
  &quot;group_designation&quot;: [
      {&quot;id&quot;: 1},
      {&quot;id&quot;: 2},
    ]
  }
  </code></pre>
  <p>However, if I send a post request using the javascript format stated above, it gives me a bad request error(400). This is the payload in network tab:</p>
  <pre><code>group_designation[0][id]: 1
  group_designation[1][id]: 2
  group_designation[2][id]: 3
  </code></pre>
  <p>In Django, this is the <code>request.data</code> result:</p>
  <pre class="lang-py prettyprint-override"><code>&lt;QueryDict: {
  'group_designation[0][id]': ['1'], 
  'group_designation[1][id]': ['2'],
  'group_designation[2][id]': ['3']
  }&gt;
  </code></pre>
  <p>My code in Django:</p>
  <pre class="lang-py prettyprint-override"><code>    def post(self, request):
          temp_objects = []
          new_data_format = {'group_designation': temp_objects}
          
          serializer = GroupSerializer(data=new_data_format, many=True)
          if serializer.is_valid(raise_exception=True):
              group_data_saved = serializer.save()
  
          return Response({
              &quot;success&quot;: &quot;success!!!&quot;
          })
  </code></pre>
  <p>I was just trying to rewrite the data format so it will be saved but no luck trying. Please help. Thank you!</p>