$scope.ptArray={m1 : $scope.somevalue1,
m2 : $scope.somevalue2,
m3 : $scope.somevalue3};
$scope.errMsg={m1 : 'msg1',
m2 : 'msg2',
m3 : 'msg3'};
if($scope.ptArray.this==""){
alert($scope.errMsg.this);
}
'this' doesn't work here. If I use m1, m2 or m3 instead of 'this' it will work, but only for that variable. What to use in the place of this