I have been starting to look at javascript objects, and I have found the format that looks like this.
var obj = {
prop1: 5,
obj2: {
prop1: [3, 6, 3],
prop2: 74,
4_3: {
str: "Hello World"
}
}
};
My question is. How do I get the console to say the string?
I have tried something like this:
console.log(obj.obj2[Object.keys(obj.obj2)[2]].str);
But it didn't work.