title: How to read a whole section from appsettings.json in ASP.NET Core 3.1?
body: <p>I want to get a whole section from appsettings.json.</p>
  
  <p>This is my appsettings.json:</p>
  
  <pre><code>{
   "AppSettings": {
    "LogsPath": "~/Logs",
    "SecondPath": "~/SecondLogs"
    } 
  }
  </code></pre>
  
  <p>C#:</p>
  
  <pre><code>var builder = new ConfigurationBuilder()
             .SetBasePath(Directory.GetCurrentDirectory())
             .AddJsonFile(this.SettingsFilesName);
          configuration = builder.Build();
  </code></pre>
  
  <p>This syntax works fine and returns "~/Logs" :</p>
  
  <pre><code>configuration.GetSection("AppSettings:LogsPath");
  </code></pre>
  
  <p>But how can I have all "AppSettings" section? Is it possible?</p>
  
  <p>This syntax doesn't work and value property is null.</p>
  
  <pre><code> configuration.GetSection("AppSettings");
  </code></pre>
  
  <p><strong>UPDATE</strong>:</p>
  
  <p>I have no model and read it in a class. I'm looking for something like this:</p>
  
  <pre><code> var all= configuration.GetSection("AppSettings");
  </code></pre>
  
  <p>and use it like </p>
  
  <pre><code>all["LogsPath"] or  all["SecondPath"]
  </code></pre>
  
  <p>they return their values to me.</p>