Loading ...
Sorry, an error occurred while loading the content.

Query is_in

Expand Messages
  • v
    Hi All, I have a collection with objects like this { name : myname , categories : [1,2,4] } Now, i d like to find every object that has any one (or more) of a
    Message 1 of 1 , Oct 21, 2009
    • 0 Attachment
      Hi All,

      I have a collection with objects like this
      {
      name : 'myname',
      categories : [1,2,4]
      }

      Now, i'd like to find every object that has any one (or more) of a
      list of categories,

      mycoll.find({categories:[3,5,4]});

      doesn't seem to do that.

      Is there an easy way or do i have to iterate over everything?

      Thanks for you time.

      Cheers
      vangelis
    Your message has been successfully submitted and would be delivered to recipients shortly.