Today, I will show you how to easily deal with MongoDB shell output in your shell (bash, ksh, …) scripts.
For readybility purpose, this topic will be divided into 2 posts. This part will focus on how to produce valid JSON output from your MongoDB shell using the “–eval” option. Second part will focus on how to use “jq” to manipulate JSON data.