Adding documents in mlab

in mongodb •  7 years ago 

If you're using mlab to access a MongoDB instance and if you're having trouble creating a document in a collection, there might be one of these 2 issues

  1. You cannot use the MongoDB syntax to create a document director inside their Add Document editor. So you cannot do db.collection.insert().

Instead you just enter the collection in JSON format.

  1. Make sure you wrap both the field name and value in double quotes.

The following is an example of what worked:

Screen Shot 2017-12-20 at 11.13.40 PM.png

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!