title: Get ViewData in View JQuery
body: <p>I have a Generic List and I'm passing it as ViewData from my Controller to my .aspx View.
  I need to get and iterate it with a Jquery Script.</p>
  
  <p>How could I make this script works?</p>
  
  <p>Regards</p>
  
  <pre><code>success: function (result) {
  
   var myArray = new Array();
   var myArray = '&lt;%: ViewData["List"] %&gt;';
  
   for (var i = 0; i &lt; myArray.length; i++) {
   alert(i);
   }
  </code></pre>