Problem in sending data if i will append all parameters to form Data than some of will not updating.
$scope.updateHospital = function(){
$scope.spList = [];
var selected = $("#lstSpe option:selected");
var message = [];
selected.each(function () {
message.push($(this).val());
});
message.forEach(function(entry){
$scope.spList.push($scope.id[entry]);
});
var formdata = new FormData();
console.log($scope.name+$scope.des+$scope.spList);//all three fields have correct value in it
formdata.append("name",$scope.name);
formdata.append("description",$scope.des);
formdata.append("primarySpecialty",$scope.spList);
$http({
method : 'PUT',
url : 'url',
headers : {"authorization" : access_token,"Content-type":undefined},
data : formdata
})
if i append "spList" to my form data than "name" and "description" is not updating the value when i send only "name & description" it is working fine. from postman this is working fine with all three values.