Q: how to check in request Column is available or not Nodejs how to check if in request Column "Status" is available or not because when i check if(Job.Status){ console.log('in statusbody');} its show error when Status Column not available

ReferenceError: Job is not defined

NODEJS//
  export function update(req, res) {
  var delta = checkcolumn( req.body);
}
function checkcolumn(Job) {  
 if(Job.Status)
{ 

console.log('in statusbody');
}

}

requestbody//
{
        "_id" : ObjectId("587244cf554a2515404de90d"),
        "Status" : {
            "updated_datetime" : ISODate("2017-01-08T13:55:27.539Z"),
            "_id" : ObjectId("587244cf554a2515404de90c"),      
            "total" : 2
},
  "description" : "",
    "updated_by" : ""
    }


A: If Job is not defined, then that's because req.body is not defined when you pass it to checkcolumn().  To fix the root of the problem, you will have to check on the request that is calling update and find out why req.body is undefined.  Perhaps you don't have the right middleware installed that sets req.body or perhaps you're using it incorrectly.  We'd have to see more of your code that calls update() to know what to advise there.
If you also want to protect checkcolumn() from throwing an error, you can have it check it's incoming parameter like this:
function checkcolumn(Job) {  
   if (Job && Job.Status) { 
       console.log('in statusbody');
   }
}

