Answer the question
In order to leave comments, you need to log in
Extract data from a collection by array?
There is.
/* 0 */
{
"_id" : ObjectId("541c03489c3009e80de19d6b"),
"ts" : 1411121993,
"close" : false,
"users" : [
"7e8f5f8fc847bc6",
"920299d58dc02ec"
],
"__v" : 0
}
/* 1 */
{
"_id" : ObjectId("541c035f9c3009e80de19d6c"),
"ts" : 1411122016,
"close" : false,
"users" : [
"7e8f5f8fc847bc6",
"a285496ba35fe98"
],
"__v" : 0
}
/* 2 */
{
"_id" : ObjectId("541c035f9c3009e80de19d6d"),
"ts" : 1411122016,
"close" : false,
"users" : [
"7e8f5f8fc847bc6",
"c2f1f4e949237d1"
],
"__v" : 0
}
select ... where (users = ['c2f1f4e949237d1', '7e8f5f8fc847bc6'] or users = ['7e8f5f8fc847bc6', 'c2f1f4e949237d1']) and close = false
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question