Usually, you will edit a field’s value or its name in MongoChef directly in-place in your tree or table view. However, in cases where you would like to edit a document’s JSON source code directly, MongoChef provides an excellent JSON editor for you.
In your tree or table view, right-click on any of your document’s fields and choose “Edit JSON…” from the context menu.
This will open the JSON editor for your document. Of course, MongoChef supports all MongoDB data types (DBRef, Code with Scope, Timestamps, binary data, etc.) in JSON. Complex, nested arrays and embedded objects? Complex data structures in the scope part of a Code with Scope field or as the id value of a DBRef? You betcha! MongoChef provides lossless JSON editing for your MongoDB documents.
At any time, you can click “Validate JSON” to make sure your current input is indeed valid. If you have an error in your JSON, MongoChef will point to the position where the error was detected and set the cursor afterwards to that position. After you’ve corrected your JSON code, you can validate it again, and you’ll see a quick confirmation:
Finally, click “Update” to update your document in its collection. That’s it!