I know the method for converting dates for the first level
db.collection.find().forEach(function(x){
x.DateField = ISODate(x.DateField);
db.collection.save(x);})
This works with first level fields, but what should I do if i want to change fields of objects in arrays such as CreatedTime in the below json sample:
{
"Pharmacy": "b",
"Medicine": [
{
"MedName": "MedB",
"Quantity": 60,
"CreatedTime" : "2006-05-05T11:44:47.86Z"
},
{
"MedName": "MedC",
"Quantity": 34,
"CreatedTime" : "2006-11-23T12:28:44.86Z"
}
]
}