In the constructor of Startup class, you can access appsettings.json and many other settings using the injected IConfiguration object:
Startup.cs Constructor
public Startup(IConfiguration configuration)
{
Configuration = configuration;
//here you go
var myvalue = Configuration["Grandfather:Father:Child"];
}
public IConfiguration Configuration { get; }
Contents of appsettings.json
{
"Grandfather": {
"Father": {
"Child": "myvalue"
}
}