Assume we have the following collection, which I have few questions about:
{ \"_id\" : ObjectId(\"4faaba123412d654fe83hg876\"), \"user_id\" : 123456
We can use $set operator to update the nested array inside object filed update the value
$set
db.getCollection('geolocations').update( { "_id" : ObjectId("5bd3013ac714ea4959f80115"), "geolocation.country" : "United States of America" }, { $set: { "geolocation.$.country" : "USA" } }, false, true );