-3
I’m having a huge doubt here.
router.post('/login', (req,res)=>{
Usuario.findAll({where: {email: req.body.email}}).then((x)=>{
console.log(x.email)
})
})
Result of 'console.log(x.email)' is Undefined. if I do the console.log(x) the result is as in the picture below. I need to have x.email content to perform a comparison.
Thank you very much in advance.
x
is an array, not an object. You must iterate over the array elements to access them as objects.– Luiz Felipe