1
I have the following JS object displayed by the console.log
I can only access the status property of the object itself, but I need to access the status property that is within the value object and has the value 400, but all types of property advisors that I try to give Undefined when I try to go beyond the first status (value 0) presented. Can anyone help me? I would also like to know what is the name given to these "internal" properties of the object?
How did you try? By logging, it should be object.value.status. Maybe the problem is not the form of access, but the moment when you try to access this data (it may be that cestja trying to access before the data are available, if they come by Ajax)
– bfavaretto
To access is what the bfavarreto said, already with respect to the name your question is the answer, so much so that the method to return the name of the internal properties is
Object.getOwnPropertyNames()
are properties not?– Chance
Actually it is an ajax request made by a function Restangular.all, perhaps it is the question of the data not being available in time. I’m trying with
object.value.status
but I get Undefined or Tried to load Angularjs more than Once– Sergio P
Ask the question the code snippet that makes the request, and the snippet that tries to treat the answer.
– bfavaretto