How can i fetch user specific data in meteor!


#1

Existing code is :slight_smile:
.js

Template.listReviewsMine.helpers({
assignedReviews(){
var ans = ReviewStudies.find({User_id: Meteor.user().username}).fetch();
console.log(ans);
return ans;
}
});

html:

    <table style="width:100%" class="blueTable">
          <tr>
             <td>Study id</td>

             <td>Date Updated</td>
             <td>Name</td>
             <td>Status</td>
             <td colspan="4">
              <div class="links"></div>
              </td>
          </tr>

          {{#each value in assignedReviews}}
             <tr>
                <td ><a href="viewer/{{value.Study_id}}?review" class="assignedReviews">{{value.Study_id}}</a></td>
                <td>{{value.Date_updated}}</td>
            
                <td> {{value.Name}}</td>
                <td>{{value.Status}}</td>
             </tr>
          {{/each}}
    </table>

I want to fetch only data using this querey:

db.assignedStudies.find (
{ Status: { $in: [“inprogress”, “unopened”] } }
)

of specific user not for all user