{
…
“tasks”: {
“00:00:00”: {
“endTime”: 1680220800,
“gmtOffset”: 32400,
“startTime”: 1680220800,
“time”: “00:00:00”,
“zones”: [
“Asia/Seoul”,
“Europe/Andorra”
]
},
“01:00:00”: {
“endTime”: 1680220800,
“gmtOffset”: 32400,
“startTime”: 1680220800,
“time”: “00:00:00”,
“zones”: [
“Asia/Seoul”,
“Europe/Andorra”
]
}
}
}
The following is part of my document content. Under the “tasks” field, the keys in the format “hh:mm:00” always have a gmtOffset
value. I want to add 100 to the gmtOffset
, but my query doesn’t work. Could you help me write a working query?
Example query:
UPDATE `your_bucket`
SET tasks = OBJECT_PUT(tasks, taskKey, OBJECT_PUT(tasks[taskKey], 'gmtOffset', tasks[taskKey].gmtOffset + 100))
FOR taskKey IN OBJECT_NAMES(tasks) END
WHERE ...;