Gijo Varghese Gijo Varghese - 3 years ago 315
Node.js Question

Get only dataValues from Sequelize ORM

I'm using the sequelize ORM to fetch data from a PSQL DB. However, when I retrieve something, a whole bunch of data is given. The only data I want is inside 'dataValues'. Of course, I can use object.dataValues. But, is there any other good solutions?

I'm using Sequelize 4.10

Answer Source

The problem occurs only when I log it using:


If I save it to a variable, I can directly access objects inside without using "dataValues"

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download