title: ember/handlebars template using dynamic string as variable name
body: <p>I have a weird situation where I need to use a dynamic string as a variable name in a handlebars loop in my Ember application.</p>
  
  <p>I have a table with some coffee drinks. Let's say I have a couple variables in my controller called "customDrinksList", "customDrink1", and "customDrink2".</p>
  
  <p>customDrinksList is an array with strings <code>["customDrink1", "customDrink2"]</code>.
  customDrink1 and customDrink2 are arrays of drink objects that come from my ember-data store.</p>
  
  <pre><code>{{#each customDrink in customDrinksList}}
    &lt;tr&gt;
      &lt;td&gt;{{customDrink}}&lt;/td&gt;
      {{#each drink in customDrink}}
        ...
      {{/each}}
    &lt;/tr&gt;
  {{/each}}
  </code></pre>
  
  <p>When I do this, <code>customDrink</code> is just the string but in the <code>{{#each drink in customDrink}}</code> statement I want to use the variable with that string name instead of using the actual string.</p>
  
  <p>When I substitute in the variable name (such as customDrink1) it returns the drinks as I'm looking for, but I need to have the variable names in customDrinksList be looped through.</p>
  
  <p>Not sure if this is possible since I haven't been able to find any solutions or maybe I should be taking another approach. Any suggestions welcome.</p>
  
  <p>This project is using Ember 1.13.x</p>