I have a document in MongoDB like
{ "_id" : ObjectId("51723a2f2b9b90e9eb190c45"), "d" : BinData(0,"c9f0f895fb98ab9159f51fd0297e236d") }
The field "d" is indexed, but how can I find by its value in mongo shell?
e.g.
db.test.find( {"d": BinData(0,"c9f0f895fb98ab9159f51fd0297e236d") } )
Not working, any idea?
Bindata is the base64 representation of a binary string.Must be instantiated.
db.test.find( {"d": new BinData(0,"c9f0f895fb98ab9159f51fd0297e236d") } )
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With