title: Handling a nested array in Flask request
body: <p>I built a webserver in Flask and I'm passing in the request using jsonp. One of the things I pass in is an nested array and when I retrieve the data in Flask, the array is completely messed up.
  Here's my code</p>
  
  <p><strong>index.html</strong></p>
  
  <pre><code>var array = [[2,1],[2,2],[2,3]]
  function getNext() {
      var data = {
          'M': 5,
          'N': 5,
          'array' : array
      };
      $.ajax({
          url: '/getNewGeneration',
          jsonp: 'callback',
          dataType: 'jsonp',
          data: data,
          success: function(response) {
              ...
          }
      });
  }
  </code></pre>
  
  <p><strong>server.py</strong></p>
  
  <pre><code>@app.route('/getNewGeneration')
  def getNext():
      M = request.args.get('M')
      N = request.args.get('N')
      liveCells = request.args.get('liveCells')
      ...
  </code></pre>
  
  <p>When I print out <code>request.args</code> I get <code>ImmutableMultiDict([('callback', u'jQuery17101683842277548142_1412736365518'), ('array[2][]', u'2'), ('array[2][]', u'3'), ('array[1][]', u'2'), ('array[1][]', u'2'), ('N', u'5'), ('M', u'5'), ('_', u'1412736417145'), ('array[0][]', u'2'), ('array[0][]', u'1')])</code></p>
  
  <p>Does anyone know how to fix this?</p>