After asynchronously acquired values are assigned to an object property, why can't they be traversed?

1. I need to make a user session list, first get a session list, because there is no user profile in the list, so after I get the list data, I traverse the data (items), asynchronously get the user information (serviceInfo) and assign it to the current item. When I print the session list data, I can see the user information, but when I actually use it, I find that there is no such attribute. The problem is Why can"t properties be used?
2.

clipboard.png

Object{}

clipboard.png

clipboard.png


clipboard.png


clipboard.png

3. When I traversed with for in, I found that there was no such attribute, indicating that the attribute was not added successfully at all. At first, I felt that it might be a problem of object copy, because the user information was an object, but then I changed the assignment method and found the same

.

problem description

the environmental background of the problems and what methods you have tried

related codes

/ / Please paste the code text below (do not replace the code with pictures)

what result do you expect? What is the error message actually seen?

May.08,2022

first of all, it is about the difference between console.dir (object) and console.dir (value) :
the former prints object the status in memory at this time:

  

have you ever encountered a similar situation

Menu