Trying to dynamically create a select input with options from a json array of objects. The JSON array of objects looks like this:
var curr_sel = [
{v:"1", n:"USD"},
{v:"2", n:"GBP"},
{v:"3", n:"CAD"},
{v:"4", n:"AUD"},
{v:"5", n:"EUR"}
];
And my view template has the following:
<select>
{{#each opt in curr_sel}}
<option value="{{ opt.v }}" >{{ opt.n }}</option>
{{/each}}
</select>
But that produces a select element with no options. Kindly help. Even better if it means using the EmberJS select class http://emberjs.com/api/classes/Ember.Select.html