mirror of
https://github.com/chubin/cheat.sheets
synced 2024-11-03 15:40:17 +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 }})
|
|
|