I'm attempting to debug the client side of a meteor app. How do I see the contents of a collection? More specifically, how do I view the contents of a LocalCollection.Cursor
as I would a plain object in the console?
On the server side, db.collectionName.find()
will output JSON and db.collectionName.find().pretty()
makes a collection's contents easy to read and inspect. How would I do something similar on the client side with the 'minimongo' collections?
You can do Collection.find({}).fetch()
to see an array of objects in the collection. Then, you can expand each object to see its properties.
Ya that's true, there is another way of doing that too,
This is what I was doing MyCollection.find({});
and in console I go in this manner
collection->docs->{{your-data-here}}.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With