Created
January 22, 2013 22:14
-
-
Save treygriffith/4599072 to your computer and use it in GitHub Desktop.
Demonstrate behavior of MongoDB $in on Array properties
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
toy1 = { | |
color: ['red', 'purple'] | |
}; | |
toy2 = { | |
color: ['pink', 'orange'] | |
} | |
Toys.find({color: { $in: ['red', 'green', 'blue'] }}, cb); | |
// finds toy1, but not toy2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment