📅  最后修改于: 2022-03-11 15:02:19.210000             🧑  作者: Mango
collection.insert(objToInsert, function (err, result){
if(err)console.log(err);
else {
console.log(result["ops"][0]["_id"]);
// The above statement will output the id of the
// inserted object
}
});