findoneanddelete id code example
Example: findoneanddelete id
CompanyModel.findOneAndDelete({ _id: data.id }, function (err, doc) {
//code here
}
CompanyModel.findOneAndDelete({ _id: data.id }, function (err, doc) {
//code here
}