Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- db
- .getCollection('test')
- .aggregate([
- {$project:
- {versions:
- {$filter:
- {input: '$versions',
- as: 'version',
- cond:
- {
- $or: [
- {$gte: ['$$version.delete', 3]},
- {'$$version.delete': {$exists: false}}
- ]
- }
- }
- }
- }
- }
- ])
Add Comment
Please, Sign In to add comment