1. 问题描述
在mongodb数据库中,已存在字段如下

现添加新字段
"具体影响版本" : "windows 7 ......"
2. Python3.7

Mongo.coll['test'].update_one({"CVE编号" : i}, {"$set" : { "具体影响版本" : ss }}, upsert=True )
执行结果

在mongodb数据库中,已存在字段如下
现添加新字段
"具体影响版本" : "windows 7 ......"
Mongo.coll['test'].update_one({"CVE编号" : i}, {"$set" : { "具体影响版本" : ss }}, upsert=True )
执行结果
本文标题:Mongo 插入数据
本文链接:https://www.haomeiwen.com/subject/tomyxqtx.html
网友评论