I have the need to create a function from a name stored in a variable. Usually this is pretty simple, I've done it before using:

```
  var funcName = "theName";
  window[funcName] = function(){
    // code here
  };

```

However in my new usecase the function I create needs to sit inside an object called `the.Name`. So what I tried to do, and it doesn't work is:

```
  var funcName = "the.Name";
  window[funcName] = function(){
    // code here
  };

```

The reason it doesn't work is because I can't reference `window["the.Name"]` as that's invalid, the correct way is `window["the"]["Name"]`. 

Does anyone have a a solution for this problem? Basically naming a function which will sit inside an object when the name is stored in a variable.