title: Access Session List in javascript
body: <p>.aspx.cs:</p>
  
  <pre><code>List&lt;SomeObject&gt; items = whatever.getList(); 
  </code></pre>
  
  <p><code>Session["records"] = items;</code></p>
  
  <p>If I access the Session in my Javascript file it gives me a string like </p>
  
  <pre><code>'System.Collections.Generic.List`1[SomeObject]'
  </code></pre>
  
  <p>.js function:</p>
  
  <pre><code>var records = '&lt;%= Session["records"] %&gt;';
  </code></pre>
  
  <p>How can I convert the session into an array?
  Thanks</p>