Question: I'm trying to access a property of an object using a dynamic name. Is this possible?

```
const something = { bar: "Foobar!" };
const foo = 'bar';
something.foo; // The idea is to access something.bar, getting "Foobar!"

```

Answer: 
You can do it like this using Lodash get

```
_.get(object, 'a[0].b.c');

```
You can use `getter` in Javascript

[getter Docs](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get)

Check inside the Object whether the property in question exists,
If it does not exist, **take it from the window**

```
const something = {
    get: (n) => this.n || something.n || window[n]
};

```