title: Meteor {{#each}} loop not working
body: <p>In my HTML file, I have a #each loop like this:</p>
  
  <pre><code>{{#each messages}}
      {{&gt; chat_message}}
  {{/each}}
  </code></pre>
  
  <p>In my helper class I am calling a method to retrieve chat messages from the Chats collection:</p>
  
  <pre><code>    Template.chat_page.helpers({
      messages:function(){
          if(!Meteor.user()){
                      alert("Please log in to chat with someone");
                      return;
          }
          else{   
              var chatId = Meteor.call("startChat",Session.get("otherUserId"),function(err,res){
              if(err){
                  console.log("callback failed");
                  return;
              }
  
                  Session.set("chatId", res._id);
                  var arrayLength = res.length;
                  for (var i = 0; i &lt; arrayLength; i++) {
                      console.log("Message "+ i +"is " + res.message[i].text);
  
                  }
                  return res.messages;
              });
            }
       }
  });
  </code></pre>
  
  <p>I can't seem to figure out why the #each loop is not showing any of the message texts returned from the helper? The text in the message array doesn't print to console either. The Session variable "chatId" does get set. So my method seems to be working and returning the entire object in "res". Any pointers?</p>