title: Post a JSON object (array) to MVC3 Controller
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/4789481/post-an-array-of-objects-via-json-to-asp-net-mvc3">Post an Array of Objects via JSON to ASP.Net MVC3</a>  </p>
  </blockquote>
  
  
  
  <p>I'm trying to post a JSON object to an MVC3 controller.  I seen solutions for this in stackoverflow, but most of the solutions are where the JSON object is then binded to a model.  How do I make so that the post JSON object (array) is convert to an array of generic c# Object types? Or something that allows me to loop through the json objects.  Please keep in mind the object is never the same.  I basically want to create one controller that will allow me to loop the json object and the get the data from there. Currently right now I get an array of objects in the MVC controller, but then I can't seem to see the data in them.  Any ideas?</p>
  
  <p>Don't know if I'm going down the right path.</p>
  
  <p>Thank you,
  -Tesh</p>
  
  <p>Javascript:</p>
  
  <pre><code> var parm = JSON.stringify({ session_id: sessionId, data: data, metaData: metaData })
  
      var ret = "";
      $.ajax({
          type: 'post',
          cache: false,
          url: path + "/Common/Export/Load",
          data: parm,
          dataType: "json",
          contentType: "application/json; charset=utf-8",
          traditional: true,
          async: false,
          success: function (data) {
              //ret = data.Table[0].Column1;
          },
          error: function (event, request, settings) {
              //alert('save error: ' + JSON.stringify(request)) + ', ' + JSON.stringify(settings); 
          }
      });
  </code></pre>
  
  <p>MVC Controller </p>
  
  <pre><code>[HttpPost]
      public ActionResult Load(String session_id, List&lt;object&gt; data, Object metaData)
      {
  
  
  
  
          return View();
      }
  </code></pre>
  
  <p>JSON Object Passed to Controller.  The object can at any time.</p>
  
  <pre><code>{
  </code></pre>
  
  <p>"Table": [
      {
        "first_name": John,
        "last_name": Doe,
        "creation_date": "2012-10-04T15:50:37.55",
        "created_by": Mary Jane,
        "last_modified_date": "2012-10-04T15:50:37.55",
        "last_modified_by": Jon Mitchell</p>
  
  <pre><code>},
  {
     "first_name": Bill,
    "last_name": Doe,
    "creation_date": "2012-10-04T15:50:37.55",
    "created_by": Jane Wick,
    "last_modified_date": "2012-10-04T15:50:37.55",
    "last_modified_by": Jon Mitchell
  }
  </code></pre>
  
  <p>]
  }</p>