Step(
function findFilters() {
database.connection.collection("diary_filter").find(this);
},
function loopFilters(error, cursor) {
var group = this.group();
cursor.each(group());
},
function testFilters(err, filters) {
console.log("here we are", filters.length);
}
);
testFilters recieves an array of lenght 1, even though there are n filters. Any thoughts on what Im doing wrong? Or any suggestions on how to handle async code better?
Does this do the trick?