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