title: Accessing JSON array from appsettings in controller without Configuration C#
body: <p>I've already searched, there are similar questions, but with JSON Array in answers they are using <code>IConfigure</code> in the controller. I can use <code>IConfigure</code> only in Startup.</p>
  <p>I have this JSON Array in <code>appsettings.json</code></p>
  <pre><code>{
    &quot;EmailList&quot;:{
      &quot;EmailArray&quot;:[
        {
          &quot;name&quot;:&quot;John Algovich&quot;,
          &quot;email&quot;:&quot;John.Algovich@mail.com&quot;
        },
        {
          &quot;name&quot;:&quot;Petr Algr&quot;,
          &quot;email&quot;:&quot;Petr.Algr@mail.com&quot;
        },
        {
          &quot;name&quot;:&quot;Mathew Cena&quot;,
          &quot;email&quot;:&quot;Mathew.Cena@mail.com&quot;
        }
      ]
    }
  }
  </code></pre>
  <p><code>EmailList.cs</code>:</p>
  <pre><code>public partial class EmailList 
  
  {
    public List&lt;string&gt; EmailArray { get; set; }
    public string Name { get; set; }
    public string Email { get; set; }
  }
  </code></pre>
  <p>There is a lot of injections in <code>Startup.cs</code>, so I used the same code for mine:</p>
  <pre><code>services.Configure&lt;EmailList&gt;(Configuration.GetSection(&quot;EmailList&quot;));
  </code></pre>
  <p><code>Controller</code>:</p>
  <pre><code>public class DevController : Controller
      {
          private readonly EmailList _devEmailList;
          private List&lt;string&gt; _emailList;
  
          public DevController(
  
              IOptions&lt;EmailList&gt; _devEmailList,
          {
  
              _devEmailList = devEmailList.Value; //This could be wrong since it's json array
              
  _emailList = new List&lt;string&gt;();
  
          }
      }
  </code></pre>
  <p>Goal: How can I access email adresses in Controller and add it to the list?</p>
  <p>I can't use <code>IConfigure</code> in Controller.</p>
  <p><em>I was refering to <a href="https://stackoverflow.com/questions/31453495/how-to-read-appsettings-values-from-a-json-file-in-asp-net-core/31453663#31453663">this answer</a>, but it originally having json without array.
  Questions with Json Arrays using <code>IConfigure</code> in Controller</em></p>