KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Say, I have a document like this.. { "ID" : "fruit1", "Keys" : [["apple", "carrot", "banana"]] } How do I query for Keys = "carrot". None of the following syntax works. db.myColl.results.find({ "Keys" : "carrot" }); db.myColl.results.find({ "Keys" : [["carrot"]] }); Following works though, but not helpful. db.myColl.results.find({ "Keys" : [["apple", "carrot", "banana"]]}); Any pointer to this query will be helpful. Thanks.
Tags (comma-separated)
Save Edits
Cancel