I am trying to run an update many query in Studio 3t's intellishell using MongoDB v.6.0.9.
This is my query:
db.address_db.updateMany({
"geometry.coordinates": {
"$geoWithin": {
"$box": [
[-134.4, 58.3],
[-134.3, 58.4]
]
}
}, {
$set: {"properties.region": "AK"}
}
});
If I run just a find({})
with the same filter criteria, it returns the proper results. But when running the updateMany()
I get 2 errors. One is a pop up from Studi 3T that says:
A syntax error was detected at the runtime. Please consider using a higher shell version or use the syntax supported by your current shell.
The 2nd error in the shell output is:
Uncaught:
SyntaxError: Unexpected token (9:5)
7 | 58.4]]
8 | }
> 9 | }, {
| ^
10 |
Uncaught:
SyntaxError: Missing semicolon. (2:25)
1 | $set:{
> 2 | "properties.region":"AK"}}});
| ^
3 |
I am unusure if my syntax is wrong or if I need to update my syntax becuase it's too old? Too new? I try adding a semi colon where it tells me but the intellishell freaks out even more with errors. Thanks!