2
0
mirror of https://github.com/chubin/cheat.sheets synced 2024-11-17 09:25:32 +00:00
cheat.sheets/sheets/_mongo/elements
2018-01-06 17:19:18 +00:00

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 }})