i have code like :
data = await photo.findOne({
where : {id}
})
that return data
{
"a" : 2,
"b" : 5
}
i want to manipulate the data like insert some field
so i add properties :
data.c = data.a * data.b
i check in console.log the data added
{
"a" : 2,
"b" : 5,
"c" " 10
}
but when i return to json
return res.status(200).json({message: "success", data })
the data still like first { "a" : 2, "b" : 5 }