I'm trying to access an object using a dynamic name. Is this possible?
const something = { bar: "Foobar!" };
const objectName = 'something';
const propertyName = 'bar';
[objectName][propertyName]; // The idea is to access something.bar, getting "Foobar!"
edit : I am trying to use a variable to access the object itself, not its properties