I have document with following structure
"_id": 1,
"params": {
"defaults": {},
"custom": {
"one": true,
"two": true,
"three": false
}
}
I want to update all params.custom fields with "on" values if they are true or "off" values if they are false. Custom may contain different fields or be empty at all, also params might not be present. How to update all documents due to this requirement?