// Classic iteration people.each(function(r){ console.log(r); }); // Classic with terse shorthand syntax people.each('console.log(r)'); // Iterate documents conditionally! // The first function is a conditional. The second is a callback to execute on records returned by the first people.find( function(r) { return r.name == brian; }, function(r) { console.log(r); } ); // Iterate conditionally via shorthand people.find('r.name == "brian"', 'console.log(r)'); // You can mix and match shorthand btw people.find('r.name == "brian"', function(r){ console.log(r) });