Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- db.coll.update(
- { article: 100500 },
- {
- $set: { a: 555 },
- $pull: { arr: { t: { $lt: 20 } } }
- }
- );
- {
- article: 100500,
- a: 400,
- arr: [
- { t: 30, b: 12, n: 90 },
- { t: 10, b: 16, n: 60 }
- ]
- }
- {
- article: 100500,
- a: 555, /* Тут было: 400 */
- arr: [
- { t: 30, b: 777, n: 90 },
- /* Тут был элемент массива */
- ]
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement