I have the following document structure.
{
"_id" : ObjectId("585a985f67962d91c0f3a1f6"),
"Email" : "[email protected]",
"PhoneNumber" : "9999999999",
"TwoFactorEnabled" : false,
"LockoutEndDateUtc" : null,
"LockoutEnabled" : true,
"AccessFailedCount" : NumberInt(0),
"DisplayName" : "Nilesh Guria",
"CreatedOn" : ISODate("2016-12-21T14:57:35.379+0000"),
"UpdatedOn" : ISODate("2018-09-17T21:32:16.027+0000"),
"Wallet" : {
"Balance" : 1000,
"UnbilledUsage": 100
}
}
I want to add a field called "CustomerCredit" with a default value of 0 inside the "Wallet" field in all such documents. How to achieve this ?