title: Handlebars reach a key value pair in general context object in a different object in #each
body: <p>I have a template used by Handlebars and my context like below:</p>
  
  <pre><code>var context = {
      abc: ["a","b","c","d"],
      xyz: {
           words: {
               a: 1,
               b: 2,
               c: 3,
               d: 4
           }
      }
  }
  var template = Handlebars.compile(tpl);
  var output = template(context);
  </code></pre>
  
  <p>Everything is fine till here. But i need to do something like:</p>
  
  <pre><code>{{#each abc }}
   &lt;li&gt;&lt;a data-toggle="tab" href="#{{ ../xyz.words[this] }}"&gt; {{ this }} &lt;/a&gt;&lt;/li&gt;
  {{/each }}
  </code></pre>
  
  <p>I expect to gather a value given by key in xyz.words context but I get nothing. Instead, if I use only <code>{{ this }}</code> it works fine and return a value from abc.</p>
  
  <p>What am I missing here?</p>
  
  <p>Edit:</p>
  
  <p>By the way I tried to use Helpers and here is what I did:</p>
  
  <pre><code>Handlebars.registerHelper("whatis", function(key){
         return  xyz.words[key];
      });
  
  {{#each abc }}
   &lt;li&gt;&lt;a data-toggle="tab" href="#{{ whatis this] }}"&gt; {{ this }} &lt;/a&gt;&lt;/li&gt;
  {{/each }}
  </code></pre>