This question is based in this previous answer.
I am trying to send an http request where one of the elements I want to send is expressed in the view as
{{selectedCountry.shipping[shippingType]}}
The request has to go along other element so in order to make a single request I mix them together with
$scope.checkoutData = angular.extend($scope.selectedCountry.shipping[$scope.shippingType], $scope.selectedCountry.name);
And then send the request with
$scope.submitForm = function() {
$http.post('process.php', $scope.checkoutData)
};
But when doing the second step I get an error. You can see the working fiddle here (with the second step commented, so it doesn't break the code). Thanks in advance!