Why when I use JSON.stringify in node.js on data from database request I get objects with the data itself, and if I use console.log I get a lot of additional parameters like dataValues, _previousDataValues, _modelOptions.... I use sequelize.js
console.log(JSON.stringify(data,'',2))
{
id:1
}
console.log(data)
Kindergarten_data {
dataValues:
{ id: 1}
_changed: {},
_modelOptions:
{ timestamps: true,
validate: {},
freezeTableName: true,
underscored: false,
underscoredAll: false,
paranoid: false,
rejectOnEmpty: false,
whereCollection: null,
schema: null,
schemaDelimiter: '',
defaultScope: {},
scopes: [],
indexes: [],...
sequelize, it returns you models, e.g. objects with data, methods, hooks etc.