What question do you think this if statement is posing?
So with this data structure you have objects within an object. When you first loop through users each key is going to be a user’s name. Therefore users[key] is how you access the object associated with each user. users['Ryan'] gets you the the object {‘age’: 19, ‘online’: true}. Now you need to access the ‘online’ attribute of this object on each loop iteration.
Remember, to access an object attribute the syntax is: object['key']
or object.key
You need to use the key (user name) to access the original object: obj[key]['online']
obj refers to the original object acceped in the function.
[key] access the user object of each user. On the first run of the loop key === 'Alan', on the second it’s Jeff, then Sarah, etc…
Unfortunately, in this circumstance using obj.key literally means obj['key'], trying to access an attribute called ‘key’ in the original object. Which isn’t useful here. When in doubt, go with bracket notation over dot notation to avoid this.
['online'] access the ‘online’ attribute of each user object
Have a look at the for…in docs. See if you can figure out how to use the key and obj together. It may help to think of the key like the index inside a normal for loop.
In your for...in loop try logging key, now try logging obj, now again think about how you can combine key and obj.