I'm using ASP.Net web api along with AngularJS to build a SPA. At this step I'm trying to retrieve a value from the response of a http post request, actually the saved id of last entry. I am getting the appropriate response but can't figure out the exact format of code to retrieve the value of the id from the response. I just need to know the exact format, I tried response.value.data.id but it didn't work for me. I also tried JSON.stringify(response) which doesn't provide the value object in the string.

Here's the function -
$scope.save = function () {
var Patient = {
name: $scope.PatientName,
age: $scope.PatientAge,
contact: $scope.PatientContact,
address: $scope.PatientAddress
};
var response = patientService.post(Patient);
console.log(response);
//$location.path('/patient/' + $scope.PatientContact);
}
And here's the http post request -
this.post = function (Patient) {
var request = $http({
method: "post",
dataType: "json",
url: "/api/PatientsAPI",
data: Patient
});
return request;
}