I am populating a drop down menu with different items in a Meteor Collection Cases
.
<select id="caseChoice">
{{#each case}}
<option>{{name}}</option>
{{/each}}
</select>
I get the value of the selection, aka the name by:
var caseName = document.getElementById("caseChoice").value;
And I can retrieve the id of the case by using:
var caseID = Cases.findOne({name:caseName})._id;
However I am planning on letting users create cases with the same name. Is their a way to pass the id through the {{each}}
without displaying the _id
in the drop down selection?