Skip to content

Commit

Permalink
Update gates.md
Browse files Browse the repository at this point in the history
  • Loading branch information
dhowe authored Nov 19, 2023
1 parent 04a23f9 commit 9a1c80e
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions docs/gates.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
#### Search and return only certain fields
**Search and return only certain fields**

Search by regular expression (use the slash or quote marks as a delimiter).
@{"name": {$regex: /^M.*/}}
**Search by regular expression (use the slash or quote marks as a delimiter).
**@{$name: {$regex: /^M.*/}}

Case insensitive:
@{"name": {$regex: /^jan.*/, $options: "i"}}
**Case insensitive:
**@{$name: {$regex: /^jan.*/, $options: "i"}}

Find by elements in array
This matches documents that contain all of these array elements:
@{"skills": {$all: }}
**Find by elements in array
**This matches documents that contain all of these array elements:
@{$skills: {$all: }}

Match on any element in the array:
@{"skills": "negotiation"}
**Match on any element in the array:
**@{$skills: "negotiation"}

**Match on inequality
@{ $strength: { $gt: 18 } }

0 comments on commit 9a1c80e

Please sign in to comment.