Model.find().toArray() claiming to not have .toArray() method
I am very new to nodejs and mongodb and am trying to piece together my own blogging application. I have a problem trying to query through my 'Blog' model for ones with a specific username. When I try to run var userBlogs = function(username) { ub = Blog.find({author: username}).toArray(); ub = ub.reverse(); }; I get an error. TypeError: Object #<Query> has no method 'toArray' I know globals are bad but I've just been trying to get it to work. The Mongo documentation claims that a cursor is returned which can have the toArray() method called on it. I have no idea why it won't work. Here is my