This article is taken from the book MongoDB in Action. The author provides a practical tour of
the most common tasks performed from the MongoDB shell, which lets users examine and
manipulate data and administer the database server itself using the JavaScript programming
language and a simple API.

Diving into the MongoDB shell (PDF)