if I have a json file as below, I am using React (or even JavaScript is also fine), can somebody help me reading this file depending upon the Environment I set, like if I set it to local, all I need is to load the settings of the local and if I set it as Prod, all the settings of the prod must be loaded using React script or JavaScript, any ideas Geeks? - thanks in advance.
[
{
"Environment": "local",
"local": {
"url-1": "https://www.google.com",
"url-2": "https://www.msn.com"
},
"Development": {
"url-1": "https://www.google.co.in",
"url-2": "https://www.msn.co.in"
},
"Test": {
"url-1": "https://www.somedifferenturl.co.in",
"url-2": "https://www.somedifferenturl.co.in"
},
"Prod": {
"url-1": "https://www.somedifferenturl2.co.in",
"url-2": "https://www.somedifferenturl2.co.in"
}
}
]