Instantly share code, notes, and snippets.

Embed
What would you like to do?
Demonstrate behavior of MongoDB $in on primitive properties
toy1 = {
color: 'red'
};
toy2 = {
color: 'pink'
}
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