I am having records like below in array:
$scope.skills = [];
$scope.skills['et']= s1
$scope.skills['et']= s2
$scope.skills['et']= s3
$scope.skills['gf']= t1
$scope.skills['gf']= t2
$scope.skills['gf']= t3
$scope.skills['po']= b1
$scope.skills['po']= b2
$scope.skills['po']= b3
Now I want to delete all records from array based on below value:
$scope.value ='gf';
Now I would like to delete all records from array whose index is other than 'gf':
So skills array should contain only record of 'gf' like below:
Expected output:
$scope.skills['gf']= t1
$scope.skills['gf']= t2
$scope.skills['gf']= t3