title: how to get data in 2D array in Django posted by AJAX
body: <p>I am sending a 2D list through ajax to django</p>
  
  <p>here is my function for sending ajax request</p>
  
  <pre><code>    var tid = $(document).find(".table-box a").data("tid")
  var newFood = [];
  
  $('#order_table td.food_name').filter(function() {
      return $(this).data('status') == 'new';
  }).each(function() {
      newFood.push( [$(this).text(), $(this).siblings('.quantity').text(), $(this).siblings('.price').text()] );
  });
  
  // This will create a 2D array like this [['food_name1','1','$10.00'],['foodname2', '2', '$11.00']] 
  
  $.ajax({
      type: "POST",
      url: $(this).data('url'),
      data: {tid:tid, newFood:newFood},
      success: function success(data){
          alert("Success")
      },
  });
  </code></pre>
  
  <p>And I print the <code>request.POST</code> out in django 
  and I get </p>
  
  <pre><code>&lt;QueryDict: {u'tid': [u'12'], u'newFood[0][]': [u'chick noodle', u'1', u'$2.00'], u'newFood[1][]': [u'Beef Rice', u'1', u'$29.00']}&gt;
  </code></pre>
  
  <p>when I print <code>request.POST.get('newFood[0][]')</code> , I get </p>
  
  <pre><code>$2.00
  </code></pre>
  
  <p>I also tried <code>request.POST.getlist('newFood[0]')</code> but I get empty list</p>
  
  <pre><code>[]
  </code></pre>
  
  <p>Any ideas on how to fix this? How can I retrive each item one by one?</p>