title: How to read appsettings.json with array of values
body: <p>I have the following appSettings.json file:</p>
  
  <pre><code>  "SundrySettings": {
  
      "CookieName": "Cookie",
  
      "AccessGroup": "Software Development",
  
      "Terminals" :  {
        "Raucherplatz" : "tablet1.local",
        "Service" :      "tablet2.local",  
        "Technik" :      "tablet3.local",  
        "Technik" :      "tablet4.local",  
        "Container" :    "tablet5.local"
      }
    }
  }
  </code></pre>
  
  <p>That I would like to load into the following structure:</p>
  
  <pre><code>
      public class Terminal
      {
          public string Name;
          public string Description;
      }
  
      public class SundryOptions
      {
          public string CookieName { get; set; } = "dummy";
          public string HRAccessGroup { get; set; } = "dummy";
          public List&lt;Terminal&gt; Terminals;
      }
  
  </code></pre>
  
  <p>that I would try to load using the following commands:</p>
  
  <pre><code>ServiceProvider sp = services.BuildServiceProvider();
  SundryOptions sundryOptions = sp.GetService&lt;IOptions&lt;SundryOptions&gt;&gt;().Value;
  </code></pre>
  
  <p>The problem I have is that using Property Initialisers never sets the Terminals List correctly. I do need a list (and not a Dictionary) as the enties could be double i.e. Technik in my example.</p>
  
  <p>I am assuming that I have some error in the Class -> I would be happy for any pointers. </p>