I have the following code:
const userSchema = new mongoose.Schema({
name: String,
loginAttempts: [ { IP: String } ]
})
const User = mongoose.model('User', userSchema, 'users')
I want to find the loginAttempt of _id y of the user with the _id x.
but how?