Now you need to add product in products collection
you need to update the id
_id : ObjectId("507d95d5719dbef170f15c00")
with following
term_years to 3
over_rate for sms in limits to 0.01 from 0
Execute below Query in mongoshell
var temp = db.products.findOne({_id:ObjectId("507d95d5719dbef170f15c00")})
temp.term_years = 3
db.products.update({_id:temp._id},temp)
temp.limits.sms.over_rate = 0.01
db.products.update({_id:temp._id},temp)
Check your answer:
by executing homework.b()
you will get your answer as
0.050.019031
No comments:
Post a Comment