title: MongoDB User.findOne({email:email})
body: <p><strong>findOne return null Always</strong></p>
  <p>I have &quot;user(hello@gmail.com)&quot; data in the database but User.findOne returns null always. Please Help me. I have a node running on background but it gives me null . <strong>req.body</strong> gives the email that im passing but findOne isnot working. <strong>User.create</strong> is working fine. but search queries like  <strong>find,findById,findOne</strong> is not working. SomeOne please help me.</p>
  <pre><code>const userSchema = new mongoose.Schema({
   name: {
      type: String,
      required: [true, 'A user must have a unique name'],
      unique: true,
    },
    password: {
      type: String,
      required: true,
      unique: true,
      minlength: 8,
    },
    email: {
      type: String,
      required: [true, 'A user must have a unique name'],
      unique: true,
      lowercase: true,
    }
  const User = mongoose.model(&quot;User&quot;, userSchema);
  
  exports.getTest=async (req,res)=&gt;{
      const {email} = req.body  // returns &quot;hello@gmail.com&quot;
      const user = await User.findOne({email})
      console.log(user) //returns null
      res.json({
       
          status:&quot;success&quot;,
          data:{
              user
          }
      })
  
  }
  </code></pre>