I have a JSON field like this. {Price:0,Title:'Test'}. I want to update Price value with 10 on MYSQL with sequelize.
I am using MYSQL 8 and JSON field supported. But in sequelize want to change Only Price with sequelize directly write to the field with {Price:10} and another fields are deleting. How can I solve this?
(async () => {
await e_products_v2.update(
{
Preferences: {
Price: 0,
},
},
{ where: { id: 1 } }
);
})();