I have thousands of documents in a collection.
{ "_id":"ABC",
"photoObject" : {
"imageUrl" : null
},
"checkinDetails" : {
"deviceModel" : "iPhone10,3",
"shiftid" : "5a6ecc6a-1d71-4400-adc6-2eb3b39cb5d0",
"deviceOS" : "iOS 11.2.2"
}
},
{ "_id":"PQR",
"photoObject" : {
"imageUrl" : null
},
"checkinDetails" : {
"deviceModel" : "iPhone6,3",
"shiftId" : "5a6ecc6a-1d71-4400-adc6-2eb3b39cb5d0",
"deviceOS" : "iOS 11.2.2"
}
}...........
.............................
I have to change only key name shiftid in a same format like shiftId .We have thousand of documents in which this key is written in two format either shiftId or shiftid .
How can I use a mongoDB query for this so that I can used query on shiftId?