I have a Mongodb schema that looks roughly like:
[ { \"name\" : \"name1\", \"instances\" : [ { \"value\" : 1, \"date\" : ISODate
Or with just a find block:
db.Collection.find({}).then(function(data) { var ret = []; for (var i = 0, len = data.length; i < len; i++) { if (i % 3 === 0 ) { ret.push(data[i]); } } return ret; });
Returns a promise whose then() you can invoke to fetch the Nth modulo'ed data.