title: Javascript nested object access root level
body: <p>I have a nested object in javascript like this one:</p>
  
  <pre><code>{
  nameRoot: "my object",
  sub: {
    nameSub: "my sub object"
  }
  }
  </code></pre>
  
  <p>I want to access nameRoot from a function defined in sub.</p>
  
  <p>Using a function i would have defined something like:</p>
  
  <pre><code>var self = this;
  </code></pre>
  
  <p>and used self but how can I do this in a literal object?</p>