For details visit : https://premaseem.wordpress.com/2016/...
There are times when we need to save the steps or commands of mongo shell and need to get it executed in the same order (for reusability and automation and avoid errors). The best solution is to save it in a file with any extension preferred is js, however I call it as mjs which means mongo javascript.
TIP : To be effective while writing query, you write commands using IDE to use auto complete, formatting, Json format verification and then redirect input to mongo
On this page of the site you can watch the video online MongoDb Tutorial 5 - How to load JavaScript and use Mongo Scripts with a duration of hours minute second in good quality, which was uploaded by the user Prem Aseem Jain 22 January 2016, share the link with friends and acquaintances, this video has already been watched 9,504 times on youtube and it was liked by 28 viewers. Enjoy your viewing!