title: Collection Return Null in Meteor JS?
body: <p>I need to return collection fields based on field name in collection.I did a sample one.The collection name in sample one is <strong>Staff</strong> and so many fields are there and one of the field name is <strong>Role</strong>.Here Roles are three types they are Master,Student and Emp. Here the collection fields are return based on Role field.For example select one Role i.e Master then return all the records of Master in a Role field.I did this also but it doesn't return. I didn't get any idea about this.i am new to meteor.So please see the below code and suggest me what to  do?</p>
  
  <p>HTML Code :</p>
  
  <pre><code> {{#each staffInfo}}
         &lt;tr&gt; &lt;td&gt; &lt;div class="suname"&gt;{{Username}}&lt;/div&gt; &lt;/td&gt; &lt;/tr&gt;
   {{/each}}
  </code></pre>
  
  <p>JS Code :</p>
  
  <pre><code>Session.set('rolltype',"Master");
  
  Template.staff.staffInfo = function () 
  {
    return Staff.find({Role: Session.get('rolltype')});
  };
  </code></pre>