This is driving me insane. I am trying to grab an object in javascript using a dynamic variable. Static variables appear to work, yet I cant for the life of me see the difference between the static vars I put in and the dynamic vars.
My snippet below better illustrates the issue
console.log(itemId); //E2
console.log(typeof itemId); //string
console.log(typeof 'E2'); //string
console.log(ganttObject.items['E2']); //object [with data]
console.log(ganttObject.items[itemId]); //undefined
The weird thing is that I have extensively used dynamic calling of objects elsewhere in the script, but it is breaking here.
Tested in Safari & Chrome

console.log(itemId === 'E2')evaluate to true? And are you absolutely sure nothing else is going on in your code?console.log(itemId)was undefined or something other than 'E2'