Sample code using monggregate library for demonstration purposes. The code cannot be run as-is. You need to have a MongoDb account and to add and fill .env to connect to your account