I have an object like this:
var myob= {
title: 'Hey',
list: [3, 74, 25],
myObject: {
myName: {
first: "Joe",
second: "Flynn"
}
}
I am trying to access the inner content via bracket notation.
myob["title"] //works fine, returns 'Hey'
myob["list[0]"] //Doesn't work, returns undefined
myob["myObject[objectTitle]"] //Doesn't work, returns undefined
Why doesn't this work? Is there a way I could do this, preferably still using the same content inside the brackets...?
Link to a jsfiddle: https://jsfiddle.net/j24dxpao/