If a configuration file has a nested structure in it, what naming convention or variable name format is used to override that value in a command line environment like Powershell?
.NET config.json file:
{
"L1a": {
"L1a2a": {
"L1a2a1": "value"
},
"L2b": false
},
"L1b": false
}
From the .NET application code, the configuration values can be accessed like this:
configObject["L1a:L1a2a:L1a2a1"];
configObject["L1a:L2b"];
configObject["L1b"];
Overriding a top level value using an environment variable is easy - just use the same key name:
$env:L1b = "true"
How can I set environment variables in Powershell to override the nested configuration file values?
L1a:L1a2a:L1a2a1 and L1a-L2b are not valid environment variable names.
Using underscore like L1a_L2b does not work.
@{ key = value }, but I can't get that to work either.