title: Use one object value as a key to access other object value in Handlebars
body: <p>I have 2 different objects:</p>
  
  <p>1) In global.json</p>
  
  <pre><code>var objA = {
      "menu": {
          "icon": [
              {
                  "network": "mail",
              },
              {
                  "network": "facebook",
              },
              {
                  "network": "twitter",
              },
              {
                  "network": "googleplus",
              }
          ]
      }
  }
  </code></pre>
  
  <p>2) In index.json</p>
  
  <pre><code>var objB = {
      "facebook": {
          "data": "Facebook Data",
      },
      "twitter": {
          "data": "Twitter Data",
      },
      "mail": {
          "data": "Mail Data",
      },
      "googleplus": {
          "data": "GooglePlus Data",
      }
  }
  </code></pre>
  
  <p>Now I want to access the second object value by using first object value as a key in <strong>.hbs</strong> file, just like we do in javascript.</p>
  
  <p><em>Like for example:</em> If I want to access twitter data, I will use the following code in javascript to access that.</p>
  
  <pre><code>for(var i=0; i&lt;objA["menu"]["icon"].length; i++){
      console.log(objB[objA["menu"]["icon"][i]["network"]]["data"]);
  }
  </code></pre>
  
  <p>I am running a each loop in a <strong>.hbs</strong> file:</p>
  
  <pre><code>{{#each global.objA.menu.icon}}
      &lt;li&gt;{{data}}&lt;/li&gt;
  {{/each}}
  </code></pre>
  
  <p>Here I want to show each social <em>data</em> based on the <em>network</em>.</p>