title: MVC3 binding for a json nested array
body: <p>I have a simple javascript array. it's declared like this:</p>
  
  <pre><code>coords = []
  </code></pre>
  
  <p>and everytime a user clicks on an image, I do something like this:</p>
  
  <pre><code>coords.push([x,y])
  </code></pre>
  
  <p>so I end up with something like this: (in javascript)</p>
  
  <pre><code>[[342,144],[477,99],[632,148],[529,162]]
  </code></pre>
  
  <p>but I don't know what to bind it to in the controller method... I've tried</p>
  
  <pre><code>List&lt;List&lt;int&gt;&gt;, int[][], int[,]
  </code></pre>
  
  <p>none of them seem to work. It only works when I use string.</p>
  
  <p>This is the code I'm using to send it to the server:</p>
  
  <pre><code>$.ajax({
      type: "POST",
      url: "/home/SaveCoords",
      data: { coords: JSON.stringify(coords) }
  }).done(function (msg) {
      alert("Data Saved: " + msg);
  });
  </code></pre>
  
  <p>And this is the code I use on the controller</p>
  
  <pre><code>[HttpPost]
  public ActionResult SaveCoords(string coords)
  {
      return Json("Hello", JsonRequestBehavior.AllowGet);
  }
  </code></pre>
  
  <p>Help?</p>