To get only dataValues from Node Sequelize ORM, we call the findById
method.
For instance, we write
const data = await Model.findById(1);
console.log(data.get({ plain: true }));
to call findById
to get the item by ID.
And then we call data.get
with { plain: true }
to return a plain object version of the result.