Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

error 28 mongodb

// 
// https://jira.mongodb.org/browse/SERVER-35220
// Change .$ to .$[]
// [
// 		{"arr":[
//			{"obj_field": "123"},
//			{"obj_field": "234"},
//			{"obj_field": "456"},
//			{"obj_field": "567"},
//		]}
// ]
//

db.test.updateMany({},{ $unset: {"arr.$[].obj_field": ""}})

 
PREVIOUS NEXT
Tagged: #error #mongodb
ADD COMMENT
Topic
Name
5+2 =