title: How to properly read nested configuration values from config.json in ASP.NET5?
body: <p>I was following some <a href="http://docs.asp.net/en/latest/conceptual-overview/understanding-aspnet5-apps.html" rel="noreferrer">examples for ASP.NET 5</a> and I got stumbled with how to properly read "nested" configuration values (if that is the proper term). </p>
  
  <p>Here is relevant portion of <code>config.json</code>:</p>
  
  <pre><code>{
      "ApplicationName" : "OwNextApp",
      "AppSettings": {
          "SiteTitle": "OwNext"
      },
  }
  </code></pre>
  
  <p>And relevant portion of <code>HomeController.cs</code>:</p>
  
  <pre><code>public IActionResult About()
  {
      var appNestedNameFailed = _config.Get("AppSettings.SiteTitle");
      var appNestedNameSuccess = _config.Get("AppSettings:SiteTitle");
      var appName = _config.Get("ApplicationName");
      ViewBag.Message = string.Format(@"Your 
          APP NAME: {0};
          APP NESTED NAME FAILED: {1}; 
          APP NESTED NAME SUCCESS: {2}", 
              appName, appNestedNameFailed, appNestedNameSuccess);
  
      return View();
  }
  </code></pre>
  
  <p>Value for <code>appNestedNameFailed</code> is empty (my initial try before research). And <code>appNestedNameSuccess</code> has value; after I did research and found in tests for <a href="https://github.com/aspnet/Configuration/blob/dev/test/Microsoft.Framework.ConfigurationModel.FunctionalTests/ConfigurationTests.cs" rel="noreferrer">Configuration</a> (relevant code shown):</p>
  
  <pre><code>// Assert
  Assert.Equal("IniValue1", config.Get("IniKey1"));
  Assert.Equal("IniValue2", config.Get("IniKey2:IniKey3"));
  </code></pre>
  
  <p>Can someone explain why is this the case? Why would it make sense to use <code>:</code> over <code>.</code>? From my interaction with JSON data usually <code>.</code> notation works fine, e.g. <a href="https://stackoverflow.com/questions/9463233/how-to-access-nested-json-data">How to access nested json data</a>. </p>
  
  <p>Also, I found similar <a href="https://stackoverflow.com/questions/27318935/configuring-properties-from-config-json-using-services-configure">SO question</a> but this does not give explanation of why <code>:</code> was chosen.</p>