Fix incorrect doc for usage

pull/2/head
Ken Chen 11 years ago
parent 7b5171f6bd
commit 614729ff20
  1. 2
      README.md

@ -458,7 +458,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