标签:
./mongo
use admin
var res=db.test.find(); while(res.hasNext()){ var res1=db.test.find(); var re=res.next(); while(res1.hasNext()){ var re1=res1.next(); if(re.age==re1.age){ db.test.remove({"age":re1.age}); } } db.test.insert(re); }
标签:
原文地址:http://blog.csdn.net/tuzongxun/article/details/51774537