Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {
- "fields" : [
- {
- "en" : "birthDate",
- "status" : "enable",
- "index" : 10
- },{
- "en" : "email",
- "status" : "enable",
- "index" : 4
- },{
- "en" : "inviterCode",
- "status" : "enable",
- "index" : 2
- }
- ]
- }
- var newData = [
- {
- "en" : "birthDate",
- "status" : "disable",
- },{
- "en" : "email",
- "status" : "disable",
- }
- ];
- collection.update(
- {'fields.en': 'birthDate'},
- {$set:{'fields.$.status': 'disable'}},
- {w:1, multi: true},
- function(error, count){
- }
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement