So I was reading the dynamically named properties, which is similar to what I am wanting to do.
I want to pass in an object to be referenced into my object type.
I have a variable in my object that I want to set.
template.format.bold = true;
I am wanting to pass in the object along with it's property into a function to set a value.
function setItem(item, value) {
template[item] = value;
}
Then I want to be call the function:
setItem('format.bold', true);
How do I do this?
Error received:
TypeError: Cannot read property 'e' of undefined