Rename/Update JSON field keys in Mongo Document: In this tutorial will see how to modify/rename JSON keys without deleting/Modifying the JSON Object for the respective key. I have a document shown below
1 2 3 4 5 6 7 8 9 10 11 12 |
{ "_id" : ObjectId("5b594b462fe5553ce8071c27"), "grades" : [80.0, 200, 300], "json1" : { "key1" : "value1", "key2" : "value2" }, "json2" : { "key2" : "value", "key1" : "value1" } } |
Now I want to update the key