I've been trying to search through documentation, and other various stack overflow posts, but I can't seem to find out how to do this. I'm trying setup a Trigger for MongoDB Atlas with the following function:
exports = function() {
const mongodb = context.services.get("test_cluster");
const db = mongodb.db("test_database");
const test_collection = db.collection("test_collection");
var tasks = test_collection.find();
console.log(JSON.stringify(tasks));
};
but the logs return "{}" every time I run it, is there something basic that I'm missing here? There is data in the collection with just some dummy data with a basic _id and some values.