I've returned to the Express stack after a lot of work in Google Go for the last few months. I'm building simple webapp page for work, iterating JSON objects. I'm trying to print the value of each key in an object that is part of the larger object, but only the key gets logged?
Here is my data.json that I read over (showing only 1 object in the entire object and omitting data for security.):
{
"Prod18r2" : {
"baseAPIURL" : "https://apiurl.com/",
"serviceEndpoints" : {
"restaurantManager" : "https://prodapiurl.com/rm/",
"transactionManager" : "https://prodapiurl.com/rm/",
"userManager" : "https://prodapiurl.com/rm/",
"recordHistory" : "https://prodapiurl.com/rm/"
}
}
}
Here is my iterate-and-log logic right now in a test.js file:
for(var x in INSTANCES.Prod18r2.serviceEndpoints) {
console.log(x);
}
Output:
PS C:\Users\payton.juneau\Desktop\Me\Projects\Node\etm-scry-webapp>node .\test.js restaurantManager transactionManager userManager recordHistory PS C:\Users\payton.juneau\Desktop\Me\Projects\Node\etm-scry-webapp>
Thanks in advance for any reply, I know this is probably embarrassingly dumb.