I have a method with a parameter called project.
If I log this, it is a bigger object with a lot of properties. One of them is "metrics
".
console.log(project)
// this will show the whole object with my needed "`metrics`". Just to make it clear. Inside of project is the property metrics with the data I need.
Now I specifically need metrics. So, I tried this:
console.log(project.metrics)
This is always undefined. How can that be if the above log shows me the object with the metrics. I tried a workaround with setTimeout
to "wait", I tried Promises with async/await. Somehow metrics gets lost although I could log it one line before.
Does anyone have an idea?