MongoDB Documentation, Release 3.0.4 Shell Helpers JavaScript Equivalents show dbs , show databases db.adminCommand('listDatabases') use <db> db = db.getSiblingDB('<db>') show collections db.getCollectionNames() show users db.getUsers() show roles db.getRoles({showBuiltinRoles: true }) show log <logname> db.adminCommand({ 'getLog' : '<logname>' }) show logs db.adminCommand({ 'getLog' : ' * ' }) it cursor = db.collection.find() if ( cursor.hasNext() ){ cursor.next(); } Changed in version 2.4. The V8 JavaScript engine, which became the default in 2.4, allows multiple JavaScript operations to execute at the same time. Prior to 2.4, MongoDB operations that required the JavaScript interpreter had to acquire a lock, and a single mongod could only run a single JavaScript operation at a time. Refer to the individual method or operator documentation for any concurrency information. See also the concurrency table (page 759). Concurrency Disable Server-Side Execution of JavaScript Data Types in the mongo Shell See also: You can disable all server-side execution of JavaScript, by passing the --noscripting option on the command line or setting security.javascriptEnabled in a configuration file. Store a JavaScript Function on the Server (page 235) MongoDB BSON provides support for additional data types than JSON . Drivers provide native support for these data types in host languages and the mongo shell also provides several helper classes to support the use of these data types in the mongo JavaScript shell. See the Extended JSON reference for additional information. 267 5.2. Administration Tutorials