Are you typing this in robomongo? It looks like it! If so it won't work. Read my note on Updating a Nested Array with MongoDB where I say this does not work in an "older shell" or anything based on it ( which robomongo is a shell based build ) because of the way the shell helper methods are currently implemented:
NOTE Somewhat ironically, since this is specified in the "options" argument for .update()
and like methods, the syntax is generally compatible with all recent release driver versions.
However this is not true of the mongo
shell, since the way the method is implemented there ( "ironically for backward compatibility" ) the arrayFilters
argument is not recognized and removed by an internal method that parses the options in order to deliver "backward compatibility" with prior MongoDB server versions and a "legacy" .update()
API call syntax.
So if you want to use the command in the mongo
shell or other "shell based" products ( notably Robo 3T ) you need a latest version from either the development branch or production release as of 3.6 or greater.
So if you want to "play with" the release candidate, either use the bundled mongo
shell with that version or simply run your code through any standard driver.