dsid在Mongo Db中找不到?

时间:2019-03-04 06:51:49

标签: mongodb

use hospitaldb
db.patients.insertOne({name:"James", age:23, "diseaseSummary": "summarymax2"})
db.patients.find()

db.diseaseSummries.insertOne({_id: "summarymax2", diseases:["Flu", "cough", "hedache"]})
db.diseaseSummries.findOne()
db.patients.findOne().diseaseSummary

var dsid=db.patients.findOne().diseaseSummary
dsid

0 个答案:

没有答案