What I have is some kind of object, structure is unknown to me beforehand, and I also receive the key (in the string form) for some value that I need, that is contained inside that object. The problem arises when the value I need is nested inside an array.
let someObject = {
  nonProblematicValue: "all good",
  arrayOfValues: ["can't touch this"]
}
let keyThatWorks = "nonProblematicValue";
let keyThatDoesNotWork = "arrayOfValues[0]"
I've tried
someObject[keyThatDoesNotWork] //undefined
someObject.[keyThatDoesNotWork]  //undefined
I know that it could be done using eval, but that is not an option because of the server setup.
 
    