const chargeSchema = Schema({
charge: Number,
start: Date,
end: Date
});
var residentSchema = Schema({
feeDetail: {
imc_or_rpr: String,
dependencyOfCare: {
type: Number,
min: 1,
max: 10
},
defaultCharge: Number,
charges: [chargeSchema]
}
});
我具有上述架构。如何从车把中的residentSchema获取收费字段?
我尝试做residentSchema.charges.charge
residentSchema.charges.start
,但一无所获。