- db.cms_Content.find({"userId":"444333f107624489bae28140d1970bbc"}).forEach(function(x) {
- if(x.title&&x.fileName){
- print(x.contentId);
- db.cms_Content.update({"contentId":x.contentId},{"$set":{"title":x.fileName}});
- }
- })
- //该片段来自于http://www.codesnippet.cn/detail/161220138057.html
来源: http://www.codesnippet.cn/detail/161220138057.html