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
Post a Comment