Merge pull request #169 from kenspirit/master

Usage for $each usage is incorrect in README.md
pull/2/head
Louis Chatriot 10 years ago
commit 974dda2643
  1. 2
      README.md

@ -495,7 +495,7 @@ db.update({ _id: 'id6' }, { $pull: { fruits: $in: ['apple', 'pear'] } }, {}, fun
// $each can be used to $push or $addToSet multiple values at once // $each can be used to $push or $addToSet multiple values at once
// This example works the same way with $addToSet // This example works the same way with $addToSet
db.update({ _id: 'id6' }, { $push: { fruits: ['banana', 'orange'] } }, {}, function () { db.update({ _id: 'id6' }, { $push: { fruits: {$each: ['banana', 'orange'] } } }, {}, function () {
// Now the fruits array is ['apple', 'orange', 'pear', 'banana', 'orange'] // Now the fruits array is ['apple', 'orange', 'pear', 'banana', 'orange']
}); });
``` ```

Loading…
Cancel
Save