sequelize.js deep save/update model instance
update
on the instance of the db
model:for eg:
const address= {
"addressInfo": {
"permanent": {
"district": "Morang",
"city": "Biratnagar",
"wardNo": "03",
"toleName": "Gaurigunj"
},
"current": {
"district": "Kathmandu",
"city": "Lazimpat",
"wardNo": "02",
"toleName": "Thamel"
}
},
to update district of permanent object call
await address.addressInfo.permanent.update({
district:"dolakha",
});
Comments
Post a Comment