I'm trying to figure how can i get an array of only the values without the keys of an attribute in sequelize ORM with no other constant making things like attribute.value.
Now i have this as instance method inside a model:
Event.getDate = function (id) {
return this.findOne({
where: {
[Op.or]: [
{ homeId: { [Op.eq]: id } },
{ awayId: { [Op.eq]: id } }
],
status: { [Op.eq]: 'FINISHED' }
},
order: [[sequelize.col('date'), 'DESC']],
attributes: ['date']
})
}
that's return [date: 1/10/2019],
it is possible to get something like 1/10/2019 inside the query?