In mongo shell, as if to delete all occurrences of "id" : "1" , the value of the field is always different. Do I use the $ unset operator? Will this remove the value and the field?
"id" : "1"
You say delete all occurrences in the field, right? If yes, then it should be like this:
db.collection.update( { id: { $exists: true } }, // criteria { $unset: { id: 1 } }, // modifier false, // no need to upsert true // multi-update );
Source: https://habr.com/ru/post/915620/More articles:https://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/915614/generating-links-to-youtube-audio&usg=ALkJrhhWsJwqJKKkD7IGLEZ59N0FCYbIHAComparing strings with SSE4 wrappers - c ++blocks do not see methods (chef resources) - closuresHow to wait for an answer in $ .post jQuery - javascriptWebapplication.targets is missing when creating an MVC4 project in MonoDevelop on OS X 10.7.4 - asp.net-mvcFailed to import "$ (VSToolsPath) \ ..." - asp.netCreating a C style callback object? - c ++MySQL - counting two things with different conditions - mysqlreplace string with multiple lines in file - unixHow to identify strings involved in an Oracle deadlock? - oracleAll Articles