I am working on a problem that requires me to read from two different .Json files depending on URL of the webpage I can't seem to find any other way to read other than the Iconfiguration. is there any way that I can determine a path for Configuration? like (/site/webURL/appsetting.json/) then pick the name of the value I would like to get (_configuration["privacy:GDPR"]) I don't have a problem reading from normal appsettings. I just want to know how I have read information from a .json with a certain path
public static string Getjsonvalue(string hostName = "")
{
string hostNam = string.IsNullOrEmpty(hostName) ? _options.Value.Paths.Defaultsite : hostName.Replace('-', '_').Replace('.', '_');
var rootPath = ("/sites/" + GetSite(hostName) + "/appsetting.json").Replace('\\', '/');
var Value = find configuration["privacy:GDPR"] in rootPath// where i need help
return Value;
}