title: Read appsettings.json from a class in .NET Core 2
body: <p>I need to read a list of properties from <code>appsettings.json</code> file (section: <code>placeto</code>) in a business class, but I haven't been able to access them. I need these properties to be public.</p>
  
  <p>I add the file in the <code>Program</code> class:</p>
  
  <p><img src="https://i.stack.imgur.com/720Cx.png" alt="Class program"></p>
  
  <p>This is my <code>appsettings.json</code>:</p>
  
  <pre><code>{
    "Logging": {
      "IncludeScopes": false,
      "LogLevel": {
        "Default": "Warning"
      }
    },
    "placeto": {
      "login": "fsdfsdfsfddfdfdfdf",
      "trankey": "sdfsdfsdfsdfsdf"
    }
  }
  </code></pre>