Question: i'm new to meteor framework
I want to fetch single from the collection 

```
 AccountNames = new Mongo.Collection("AccountTypeMaster");

```

I created a collection using

```
 db.createCollection("AccountTypeMaster")

this.helpers({
    AccountNames: () => {
      return AccountNames.find({}, {fields: {name: 1}});    
    }
});

```

Using above query i'm unable to fetch single field "name" from collection.
I'm now sure what's wrong with my code.

Answer: 
You need to change how you instantiate your collection. The correct Meteor syntax would be:

```
AccountNames = new Mongo.Collection("AccountTypeMaster");

```

Helpers also need to be attached to a template. Remember, helpers only run on client-side code.

```
if (Meteor.isClient) {
  // This code only runs on the client
  Template.body.helpers({
    tasks: function () {
      return AccountNames.find({}, { fields: { name: 1 } });   
    }
  });
}

```
Create Client folder in your project and put client side code into that folder.[To create collection in mongodb](https://www.meteor.com/tutorials/blaze/collections) 

```
Template.name.helpers({
   fun: function() {
  return AccountNames.find({},{name: 1}).fetch();    

})

```