Update Deeply Nested Sub Document - From Mongo Shell

All,

I need help on how to update deeply nested sub document fields from Mongo Shell. Is it possible to do it or not.

The below is my collection design:

db.TestColl.insertOne(
  {
    _id: ObjectId("630e00266bca1d7face1be49"),
    cId: Long("10003014"),
    vId: Long("1006"),
    vc: {
      code: '4',
      tagif: Decimal128("0"),
      tagsD: Decimal128("0")
    },
    tag: 
		{
		  rc: { typeId: 75, name: 'STR' },
		  tsN: '206158433290',
		  tStDt: ISODate("2014-08-08T14:24:12.000Z"),
		  tEnDt: ISODate("2015-09-16T15:21:42.000Z"),
		  tagEx: 
			[
				{
				  reasonCode: 'INACTIVE',
				  exDate: ISODate("2018-11-15T00:00:00.000Z")
				},
				{
				  reasonCode: 'NEG',
				  exDate: ISODate("2018-11-15T11:19:28.000Z")
				}
			],
		  tagAs: { typeId: 3079, value: 'Suspended' }
		}
    }
);

In the above collection, I would like to update the exDate filed of all the sub documents in tagEx Array by adding a date or using current date.

I tried by using forEach and multiple other ways, I am unable to update it from Mongo Shell.

Can you please help me how this can be done. The issue is, the sub document may be more deeply nested.

What are my options?

I am attempting to do something like this using for Each:

db.TestColl.find({cId : Long("10003014")}).forEach(function (doc) {

	var array = doc.tag.tagEx;
	print(array);
	if (array != undefined){
		for(var i=0;i<array.length;i++)
			{
				print(array[i].exDate);
				db.TestColl.updateOne({_id:doc._id},{ $set: { "doc.tag.tagEx[i].exDate" : "2018-01-01" }});
			}
	}
});

Regards