title: Map name to id in Meteor app
body: <p>In Meteor, I have already subscribed to a publications which publishes many documents from a collection. Each document has <code>_id</code> and <code>name</code>. I print all these documents somewhere in my app.</p>
  
  <p>On some other place in my app I have some IDs. But instead of printing the ID, I want to print the name which corresponds to the id.</p>
  
  <p>I could simply use</p>
  
  <pre><code>for (var i=0; i&lt;idList.length; i++) {
    doc = CollectionName.findOne(idList[i]);
    console.log(doc.name);
  }
  </code></pre>
  
  <p>but will this result in poor performance? I am thinking that since I have already subscribed to the entire collection, it wont cost more to perform a mongodb call for each id. Am I wrong?</p>