Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let consider the dataCollection name is restaurants1=
- {
- "address": { "building": "1007",
- "name": "Morris Park Bake Shop",
- "restaurant_id": "30075445"
- }
- .....
- db.restaurants1.findAndModify({
- query: { "name" : "Morris Park Bake Shop" },
- update: { $inc: { "age": 1 } },
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement