Skip to content

Instantly share code, notes, and snippets.

@DesignFront
Created February 5, 2020 18:18
Show Gist options
  • Save DesignFront/1fc8734606f9d06c70165826eaf2f33d to your computer and use it in GitHub Desktop.
Save DesignFront/1fc8734606f9d06c70165826eaf2f33d to your computer and use it in GitHub Desktop.
Mongo queries
// Find (not equal to):
db.getCollection('Task').find({type: {$ne: 1}})
db.getCollection('documents').find({'pages.zones.regex': {$exists: true, $ne: ''}})
// Detect non empty strings
db.getCollection('DocumentDefinition').find({'pages.zones.regex': /(.|\s)*\S(.|\s)*/})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment