Help with template level subscription!

So I’m new to meteor, which won’t be a surprise when you’re done reading my question.

So, I want to use template level subscriptions, and I’m currently using a package called meteor-toys, so I can tell that my template is subscribed to the data, however, I have no idea how to use it ! I have been looking through the template.subscribe without any clarification !

I would like maybe to post the data i’ve subscribed to on the console ? or maybe attach it to a variable so that I can see what kind of object i’m dealing with.

Can anyone perhaps show me some examples of how I could print out the data i’ve subscribed to in the console ?

You use the Collection to query the data on the client. Basically the same query as in the Meteor.publish part. You can read more about it in the Meteor Guide:

1 Like

To print all objects of a collection in the console, you do: console.log(MyCollection.find().fetch()).

1 Like

Thank you very much :smiley: just what I needed

If you’re using Meteor Toys, you can see the data you’re subscribed to in the collection tabs.

1 Like