title: Can I attach an array of ints to a Json object and pass to controller method?
body: <p>Basically what I do here is pass a couple string values attached to a Json object to an MVC controller method, and this method takes those parameters with it's input params and does something with them. Just the names of the paramaters have to match up and I can use then, similar to direct MVC routing...</p>
  
  <p>I want to use this same method to create a grid in memory with MSChart. However, I want to pass arrays of values to the controller through Json so I can create a grid from those values.</p>
  
  <p>Can I do that? and how?</p>
  
  <p>Here is the code I already have for the prior reason:</p>
  
  <pre><code>function showAnalysisView(analysisType)
          {
              var typeJSON = {};
              typeJSON["id"] = GetGUIDValue();
              typeJSON["value"] = analysisType;
  
              $.ajax({
                  type: "POST",
                  url: "&lt;%= Url.Action("AnalysisNavigation", "Indications") %&gt; ",
                  dataType: "jsonData",
                  data: typeJSON,
                  success: function(data) {
                      if (analysisType == 'Prepayment') {
                          document.getElementById('prepaymentView').innerHTML = "";
                          $("#prepaymentView").append(data);
                      }
                      else if (analysisType == 'Exposure') {
                          document.getElementById('exposureView').innerHTML = "";
                          $("#exposureView").append(data);
                      }
                  }
              });
          }
  </code></pre>
  
  <p>Can I have instead of :</p>
  
  <pre><code>typeJSON["value"] = analysisType;
  </code></pre>
  
  <p>Something like:</p>
  
  <pre><code>typeJSON["xArray"] = {0,1,2,3,4,5};
  </code></pre>
  
  <p>and then read it with my controller like:</p>
  
  <pre><code>public System.Web.Mvc.ActionResult MakeGrid(int[] values)
  {
  
  }
  </code></pre>
  
  <p>Thanks!</p>