- db.foo.find({"$where":function(){
- for(var current in this){
- for(var other in this){
- if(current != other && this[current] == this[other]){
- return true;
- }
- }
- }
- return false;
- }})
- //该片段来自于http://www.codesnippet.cn/detail/131220138036.html
来源: http://www.codesnippet.cn/detail/131220138036.html