getCollection() – Return a collection object command
Returns the full name of a specified collection.
Syntax diagram
Command parameters
- collectionName
- Name of a collection.
Output
Returns the full name of the collection.
Examples
The following example shows the command syntax for retrieving the full name of the collection
Friends
:db.getCollection("Friends")
The following example
shows the syntax of a value returned from running the getCollection
command:TEST."Friends"