I have a collection "room_user" with these document -
/* 0 */
{
"_id" : ObjectId("524d1ae07847c05671a2965c"),
"room_name" : "room1",
"members" : [
"user1",
"user2"
]
}
/* 1 */
{
"_id" : ObjectId("524d1aec7847c05671a2965d"),
"room_name" : "room2",
"members" : [
"user1",
"user2",
"user3"
]
}
/* 2 */
{
"_id" : ObjectId("524d1af27847c05671a2965e"),
"room_name" : "room3",
"members" : [
"user1",
"user2",
"user4"
]
}
/* 3 */
{
"_id" : ObjectId("524d1b387847c05671a2965f"),
"room_name" : "room4",
"members" : [
"user1",
"user5"
]
}
Now I want to search/get the name of room ("room_name") where ONLY user1 and user2 are.