I have a query that was working with older version:
await this.model.findOne({ userEmail, \'environments.envId\': envId },{ \'environments.$\': envId })