title: Read json array from appsettings c#
body: <p>I have array in my <code>appsettings.json</code></p>
  
  <pre><code>"steps": [
  {
    "name": "IMPORT",
    "enabled": true
  },
  {
    "name": "IMPORT_XML",
    "enabled": true
  },
  {
    "name": "COMPARE",
    "enabled": true
  },
  {
    "test_name": "COMPARE_TABLE",
    "enabled": true
  }]
  </code></pre>
  
  <p>In my class I am trying to retrieve it using <code>IConfigurationRoot _configurationRoot</code></p>
  
  <p>I've tried:</p>
  
  <pre><code>var procSteps = _configurationRoot.GetSection("steps");
  foreach (IConfigurationSection section in procSteps.GetChildren())
  {
      var key = section.GetValue&lt;string&gt;("test");
      var value = section.GetValue&lt;string&gt;("enabled");
  }
  </code></pre>
  
  <p>and:</p>
  
  <pre><code>var procSteps = _configurationRoot.GetSection("ExecutionSteps")
              .GetChildren()
              .Select(x =&gt; x.Value)
              .ToArray();
  </code></pre>
  
  <p>But none of them retrieved me values of it. Does anyone know what's the case and what is the correct way to access values of such array?</p>