This is my config.json File
{
"timeout":10000
"Status":{
"Error":{"message":"Runtime","continue":False}
}
}
First I want to read the value "Error" and the the value "False" and assign them to two different variables. How can I read those two values from the config.json file.
Any help is appreciated. Thankyou.
To make this easy, make it a .ts file instead of a .json file:
app.config.ts:
Then just import appConfig where you need to access it:
and access it as follows:
Or:
PS it is possible to import a JSON file if that is necessary but importing JSON is less powerful since you cannot add code to a JSON file but you can to a .ts file