I'm attempting to extract data from a file that contains the following snippet:
const config = {
appName: 'my app',
};
If I log the variable containing this data, it shows up as expected:
const config = {
appName: 'my app',
};
Therefore, I know the data is stored in a variable named 'data.'
The issue arises when I try console.log(data.config.appName)
which results in undefined.
Do I need to convert something? How can I resolve this to access the values successfully?