title: Can't use returned list from ajax call
body: <p>I'm trying to get a list with an AJAX call to a C# method and display its items with jQuery, but I'm not able to do it. Here is what I got:</p>
  
  <pre><code>public string test()
  {
      return "test ok";            
  }
  
  $.ajax({
      type: "POST",
      url: "Computer/test",
      success: function (data) {
          alert(data);
      },
      error: function () {
          alert("error");
      }
  });
  </code></pre>
  
  <p>This works as expected and i get an alert with 'test ok' string. However if i try to return a list i'm unable to traverse it in jquery.</p>
  
  <pre><code>public List&lt;string&gt; testList()
  {
      List&lt;string&gt; test = new List&lt;string&gt;;
      test.Add("test1");
      test.Add("test2");
      return test;
  }
  
  $.ajax({
      type: "POST",
      url: "Computer/testList",
      dataType: "json",
      success: function (data) {
          var list = data.d;
          $.each(list, function (index, item) {
              alert(item);
          });
      },
      error: function (xhr) {
          alert(xhr.responseText);               
      }
  });
  </code></pre>
  
  <p>With this code I get the following error:</p>
  
  <blockquote>
    <p>System.Collections.Generic.List`1[System.String]</p>
  </blockquote>
  
  <p>Hope you can help me, thanks.</p>