In my controller I have a list of strings like this:
columns : ['name', 'description']
I want to filter what is displayed in the template based on this list:
{{#each m in controller.model}}
{{#each col in controller.columns}}
<td>{{m[col]}}</td>
{{/each}}
{{/each}}
Of course {{m[col]}}
is not valid code but you get the idea. How might I achieve this?
This code is generic so I have no way of telling what the columns array contains before hand.