title: Getting an Array from Controller Method, passing it to Javascript/JQuery
body: <p>So I have this test method in my controller, in a C# MVC Project (using razor markup):</p>
  
  <pre><code>public virtual string[] TestArray(int id)
  {
      string[] test = new string[] { "test1", "test2", "test3", "test4", "test5" };
  
      return test;
  }
  </code></pre>
  
  <p>Is there any way to get this array into javascript?</p>
  
  <p>Here is what I've tried:</p>
  
  <pre><code>function testArray(id) {
      $.get('Project/TestArray/' + id, function (data) {
          alert(data[0]);
      });
  }
  </code></pre>
  
  <p>It goes without saying that this didn't work - I'm not great with javascript.</p>
  
  <p>How can I correctly do what I'm describing?</p>
  
  <p><strong>NOTE</strong>: "Project" is the URL pattern for my Controller.</p>