title: Return array of strings from MVC to jQuery ASP.NET
body: <p>I want to return an array of strings from an MVC function via a jQuery AJAX call.</p>
  
  <p>My client side code is:</p>
  
  <pre><code>function get_categories() {
      var url = "/Profile/GetCharacters";
      $.post(url, function (data) {
      alert(data);
  });
  </code></pre>
  
  <p>But I cannot read array elements. In <code>alert(data)</code> it always says <code>system.array[]</code>
  and in <code>alert(data[0])</code> it says <code>s</code> (i.e. first character in system.array[]) and not the array elements.</p>
  
  <p>Here is simplified version of my server side code.. cause original is big way too complicated  :)</p>
  
  <pre><code>public Array GetCharacters()
      {
  
          var ret = new string[10];
          ret[0]="abc";
          ret[1] = "def";
          ret[2] = "ghi";
          return (ret);
      }
  </code></pre>
  
  <p>but this gives "System.string[]" instead and same problem when accessing individual values</p>