title: Parse json array data
body: <p>I have the following code where on button click I make a ajax call to c# controller. I also need to pass some values back to controller.</p>
  
  <pre><code>var array = JSON.stringify(myArrayList);
  
       $.ajax({
              type: "POST",                
              dataType: 'json',
              data: {
                  'type': vm.myType,
                   'mod': vm.myMod,
                   'ar' : array 
              },
              url: rootDir + "/Home/GetData",                              
              success: function (data) {
                  console.log(data);                   
              },
              error: function (xhr, status, error) {
                  console.log("Error");
              }                
          });
  </code></pre>
  
  <p>And in my c# controller I have:</p>
  
  <pre><code> [HttpPost]
      public IActionResult GetData(string type, string mod, string ar)
      {
         //I can get type and mod but having issues in getting my array data
      }
  </code></pre>
  
  <p>My Array data is as below:</p>
  
  <pre><code>[{"id":"1","name":"John"},{"id":"2","name":"Steve"}]
  </code></pre>
  
  <p>In my loop I want to grab is and name values. I tried with </p>
  
  <pre><code>JArray v = JArray.Parse(ar);
  </code></pre>
  
  <p>But cant loop though and get the values</p>
  
  <p><strong>Updated:</strong></p>
  
  <p>I think there is issue in my json array because of which I am not able to get the values of json array in my c# controller.</p>
  
  <p>When I debug my array in java script it has values like this:</p>
  
  <pre><code>Array(2)
  0 Object
    id: "1"
    name: "John"
  1 Object
    id: "2"
    name: "Steve"
  </code></pre>
  
  <p>After I use Json.stringify as below:</p>
  
  <pre><code>var array = JSON.stringify(myArrayList);
  </code></pre>
  
  <p>Now in my C# controller I get the resultant string as:</p>
  
  <pre><code>[{"id":"1","name":"John"},{"id":"2","name":"Steve"}]
  </code></pre>
  
  <p>This I think is not correct because when I use the below code:
       dynamic stuff = JObject.Parse(ar);</p>
  
  <p>It throws error: </p>
  
  <pre><code>  'Error reading JObject from JsonReader. Current JsonReader item is not an object: 
  </code></pre>