mirror of
https://github.com/chubin/cheat.sheets
synced 2024-11-09 07:10:36 +00:00
7 lines
213 B
Plaintext
7 lines
213 B
Plaintext
|
// Match documents that contains that specified field
|
||
|
db.books.find( {category: {$exists: true }})
|
||
|
|
||
|
// Match documents whose field value is of the specified BSON data type
|
||
|
db.books.find( {category: {$type: 2 }})
|
||
|
|