mongodb - How can I find entries that match a certain array of values with the mongo ruby driver -


i know can find entries in mongodb match array of values natively via command:

db.vendors.find({"somearray.property": { $in: ["value1","value2"]}}) 

but how can ruby driver 'mongo' gem?

col.find("somearray.property" => ["value1","value2"]) 

regards

you can this:

col.find("somearray.property" => { '$in' => ["value1","value2"] }) 

Comments

Popular posts from this blog

javascript - JS causing window size to be bigger than necessary - Dropdown bug -

php - Calling a template part from a post -

How to mention the localhost in android -