I have this array:
$scope.arrayList=[{FirstName:"",LastName:""}]; $scope.Address=[{address:"",PhonNumber:""}];
and I want to push this another $scope.Address
array into the first(index)
object and the output should be like this:
$scope.arrayList=[{FirstName:"",LastName:"",$scope.Address}];
When I tried to push the address into the array it is creating a new object, so I tried this:
$scope.arrayList[0].push($scope.Address);
But it's showing this error: "[0] is undefined"