title: Not able to access JSON data in ajax jquery
body: <p>I have a Jquery AJAX POST method.Which call a web method of asp.net.
  The ajax method get a json data.
  The data format is :</p>
  
  <pre><code>[
      {
          "Title": "Test2",
          "Name" : "AMIT",
          "IsRoot": "True"
      },
      {
          "Title": "Test3",
          "Name" : "AMIT1",
          "IsRoot": "False"
      },
      {
          "Title": "Test4",
          "Name" : "AMIT2",
          "IsRoot": "True"
      }
  ]
  </code></pre>
  
  <p>I validate the dataformat in "<a href="http://jsonlint.com/" rel="nofollow">http://jsonlint.com/</a>" site and it's telling that dataformat is correct.
  I want to loop through the data and access each of the attribute.But I am not able to get that.
  I try to find the total array length which should be 3.But it's giving me 9(means each attribute )
  I try </p>
  
  <pre><code>alert(data.d.length); // giving 9 (should give 3)
  
  var jsondata = data.d;
  
  alert(jsondata[1].Title); //undefined (should give Test3)
  alert(jsondata[2].Title); //undefined (should give Test4)
  alert(jsondata[1].Name); //undreined (should give AMIT1)
  
  var key, count = 0;
  for (key in data.d) {
      if (data.d.hasOwnProperty(key)) {
          count++;
      }
  }
  alert(count); // giving 9 (should give 3)
  </code></pre>
  
  <p>any help is highly accepted.</p>
  
  <p>My ajax calling method is </p>
  
  <pre><code> $.ajax({
      type: "POST",
      contentType: "application/json; charset=utf-8",
      url: "WebForm1.aspx/GetRootData",
      dataType: "json",
      success: function (data, textStatus) {
          var jsondata = data.d;
  
          alert(jsondata[1].Title);
          alert(jsondata[2].Title);
          alert(jsondata[1].MimeType);
  
          var key, count = 0;
          for (key in data.d) {
              if (data.d.hasOwnProperty(key)) {
                  count++;
              }
          }
          alert(count);
      },
      error: function (xhr, ajaxOptions, thrownError) {
          alert(xhr.status);
          alert(xhr.responseText);
          alert(thrownError);
      }
  });
  </code></pre>
  
  <p>and don't know why debugger also not working.. :( </p>