I encountered a similar issue as described in this thread: Can't access object property, even though it exists. Returns undefined
However, in my scenario, the problematic property is data.hostId.id
. The data
object comes in fully, but the hostId
appears to be undefined even though it exists in the JSON object. Here's how the structure looks:
https://i.sstatic.net/1TOBj.png
https://i.sstatic.net/lmda0.png
As evident from the screenshots, I'm trying to access the qgUSerHost
(at the end) from the object, but it throws undefined. I attempted using setTimeout
, which didn't work…
I also experimented with the solution provided in the mentioned post, but unfortunately, it didn't resolve the issue. Any thoughts or suggestions on this matter?