title: How to iterate a mongo query through a for loop
body: <p>What I'm trying to achieve is the following which doesn't work:</p>
  
  <pre><code>var names = ["MATT", "GABE", "SAM"];
  var students = [];
  for (var i = 0; i &lt; 3; i++) {
    students[i] = Programs.find({ CampYear: 2016, 'Teachers.Week1.Sunday': names[i] }).fetch();
    }
  </code></pre>
  
  <p>I would expect that it would return an array of student names for each iteration, but I keep getting an empty array when the array should have names. </p>
  
  <p>If I remove the for loop and just do:</p>
  
  <pre><code>students[0] = Programs.find({ CampYear: 2016, 'Teachers.Week1.Sunday': listOfSundayTeacherNames[2] }).fetch();
  </code></pre>
  
  <p>It will return the student name(s) expected. Is a for-loop the right way to do this? </p>