Google News
logo
MongoDB - Interview Questions
What is a Document in MongoDB?
A Document in MongoDB is an ordered set of keys with associated values. It is represented by a map, hash, or dictionary. In JavaScript, documents are represented as objects :

{"greeting" : "Hello world!"}
 
Complex documents will contain multiple key/value pairs :

{"greeting" : "Hello world!", "views" : 3}

Advertisement