My query is as shown below :
db.test.findAll({
group: ['source'],
attributes: ['source', [Sequelize.fn('COUNT', 'source'), 'count']],
order: [
[Sequelize.literal('count'), 'DESC']
]
}).then((sources) => {
sources.forEach((info) => {
console.log('sorce name :' + info.source + " count : " + info.count);
})
}).catch((err) => {
console.log(err);
})
So, here what happens is info.source name is printed perfectly. But info.count is undefined even if it is shown in the response ?