title: ASP.NET MVC Help trying to convert a list to Javascript Array
body: <p>I'm using ASP.NET MVC (with Razor) and JQuery</p>
  
  <p>I have a list of strings in my controller and I render the partial view passing in the model with the below list.</p>
  
  <pre><code>List&lt;string&gt; list = new List&lt;string&gt;();
  list.Add("test1");
  list.Add("test2");
  </code></pre>
  
  <p>On client side I have:</p>
  
  <pre><code>&lt;div id = "test", test-att = @Html.Raw(Json.Encode(Model.list)) /&gt;
  </code></pre>
  
  <p>In my javascript file I do:</p>
  
  <pre><code>var javascriptArray = $('#test').attr('test-att');
  </code></pre>
  
  <p>I'm expecting a result <code>["test1", "test2"]</code> but I'm seeing <code>"["test1", "test2"]"</code></p>
  
  <p>Any ideas on how to fix this?</p>