I have a collection containing entries in following format:
{
"_id" : ObjectId("5538e75c3cea103b25ff94a3"),
"userID" : "USER001",
"userName" : "manish",
"collegeIDs" : [
"COL_HARY",
"COL_MARY",
"COL_JOHNS",
"COL_CAS",
"COL_JAMES",
"COL_MARY",
"COL_MARY",
"COL_JOHNS"
]
}
I need to find out the collegeIDs those are repeating. So the result should give "COL_MARY","COL_JOHNS" and if possible the repeating count. Please do give a mongo query to find it.