title: Add custom section to .NET Core local.settings.json
body: <p>I'm writing my first Azure function (based on .NET Core 2.x), and I'm struggling to extend the app settings with my custom mapping table.</p>
  
  <p>I have a file <code>local.settings.json</code>, and I have tried to extend it with a "custom" config section that contains a few "key/value" pairs - something like this:</p>
  
  <pre><code>{
    "IsEncrypted": false,
    "Values": {
      "FUNCTIONS_WORKER_RUNTIME": "dotnet",
      ... (standard config settings) ...
    },
    ... (more default sections, like "Host" and "ConnectionStrings")
    "MappingTable" : {
      "01" : "Value1",
      "02" : "Value2",
      "03" : "Value3",
      "else" : "Value4"
    }
  }
  </code></pre>
  
  <p>I get the <code>IConfiguration</code> injected into my worker class via constructor injection, and it works just fine for the "basic" default values stored in the "Values" section:</p>
  
  <pre><code>public MyWorker(IConfiguration config)
  {
      _config = config;
  
      string runtime = _config["FUNCTIONS_WORKER_RUNTIME"];  // works just fine
  
      // this also works fine - the "customSection" object is filled
      var customSection = _config.GetSection("MappingTable");
  
      // but now this doesn't return any values
      var children = customSection.GetChildren();
  
      // and trying to access like this also only returns "null"
      var mapping = customSection["01"];
  }
  </code></pre>
  
  <p>I'm stuck here - all the blog post and articles I find seem to indicate to do just this - but in my case, this just doesn't seem to work. What am I missing here? I'm quite familiar with the full .NET framework config system - but this here is new to me and doesn't really make a whole lot of sense just yet......</p>
  
  <p>I have also tried to move the entire <code>MappingTable</code> section to <code>appSettings.json</code> - but that didn't change anything, I'm still getting back only <code>null</code> when trying to access my custom config section's values....</p>
  
  <p>Thanks!</p>
  
  <p><strong>Update:</strong> all the suggested ways of doing this work just fine with a standard ASP.NET Core 2.1 web app - but in the Azure function, it's not working. Seems like code in an <strong>Azure Function</strong> is <strong>treating configuration differently</strong> than a regular .NET Core code base ...</p>