Axios return undefined values?

I am trying tot fetch the response from a post request but so far the client side returns undefined value

app.post('/login',(req,res)=>{
let logindetail={firstname:req.body.firstname,
password:req.body.password}
logindetail.firstname=logindetail.firstname.replace(/['"]+/g, '')
logindetail.password=logindetail.password.replace(/['"]+/g, '')
console.log(logindetail.firstname)



var count = Object.keys(userdatas).length;
console.log(count);

for(var i=0;i<count;i++)
{
if(logindetail.firstname==userdatas[i].firstname&&logindetail.password==userdatas[i].password)
{

  res.send(userdatas[i]);
  return

}

}

});
**ClientSide**

       
handleSubmit=(e)=>{ 
          alert(this.state.Firstname)
          e.preventDefault();
          axios.post('http://localhost:3001/login', {
            lastname: this.state.Lastname,
            firstname: this.state.Firstname,
            password:this.state.password,
            phoneno:this.state.phoneno
            
          }).then(res=>alert(res.data.firstname))
          
         
        
        }