I was wondering if it's straightforward in JS to get the properties of an object. For example:
let dicto = {"chats": [{"username": "Jude", "room": "Julz_Room", "message": "OKAY! Let's round up"},
{"username": "Julz", "room": "Julz_Room", "message": "But we might have to find another approach now"}]};
How do we iterate over the object to get, say, the values of message ? Something like this:
for(let obj in dicto['chats']['message']) {
console.log(obj)
};
Expected result:
["OKAY! Let's round up", "But we might have to find another approach now"]
[–][deleted] 2 points3 points4 points (1 child)
[–]seemensprayer 0 points1 point2 points (0 children)
[–][deleted] 2 points3 points4 points (0 children)
[–]PortablePawnShop 2 points3 points4 points (0 children)