Return multiple fields for use in a dropdown


#1

I have this helper in meteor

terms:function(){
    return Terms.find().fetch().map(function(it){ return it.termnames; });
  }

which only returns the termname but i am also interested in the _id.

This is my current html

<select name="dd">
{{#each terms}}
<option value="">{{this}}</option>
{{/each}}
</select>

How can i return the termnames and the _id and display them in my view?.


#2

no reason to use fetch and map

just use Term.find() then call _={{_id}} in the each block