Meteor-Community-Packages / meteor-autocomplete

Client/server autocompletion designed for Meteor's collections and reactivity.
https://atmospherejs.com/mizzao/autocomplete
MIT License
350 stars 109 forks source link

having a hard time structuring #93

Open sangyoo91 opened 9 years ago

sangyoo91 commented 9 years ago

I am trying to retrieve the users that are participating in a discussion. Here is the structure of my post

post =  {
  commentors: {
        {
            _id : "someid",
            username : "someusername"
        },
        {
            _id : "someid",
            username : "someusername"
        },
  }
}

I would like to retrive the username in the dropdown. How would I do this?

Right now I have this.

  settings: function () {
    return {
      position: "bottom",
      limit: 5,
      rules: [
        {
          token: '@',
          collection: Posts,
          field: "commentors",
          template: Template.usernameTag
        }
      ]
    };
  }