title: How to properly parse C# List of objects to Javascript. Only shows type like " System.Collections.Generic.List`1"
body: <p>I really cant wrap my head around this i have a List of this class</p>
  
  <pre><code>public class StandardText
  {
      public string Id { get; set; }
      public string Value { get; set; }
  }
  </code></pre>
  
  <p>I then want to use it in javascript where i pass down a model to a partialView. The problem is that i dont seem to be able to use it. i tried to JSON.parse() the list in the javascript but it will then try to JSON.parse() something like " System.Collections.Generic.List`1" so it is not trying to actually parse the values of the object. i also tried to JsonConvert before i send it down but i am failing on how to porperly convert it. </p>
  
  <p>this is where i create the model and then send down the partialView </p>
  
  <pre><code>public async Task&lt;ActionResult&gt; _confirmText(TextViewModel model)
      {
          model.StandardText = await GetStandardText();
          return PartialView(model);
      }
  </code></pre>
  
  <p>Then in that partialView i simply want to pass it to my frontend via a global scope(i know bad)</p>
  
  <pre><code>var text = '@Model.StandardText';
  window.addElementToModal(element, text);
  </code></pre>
  
  <p>And then the addElementToModal</p>
  
  <pre><code>(window as any).addElementToModel = ((root: HTMLElement, standardText: {[key: string]: string}) =&gt;
  {
      init(root, standardText);
  });
  </code></pre>
  
  <p>so i want to recieve it like {[key: string]: string} where am i going wrong?</p>