I am using angular JS. Below is my Angular code
$scope.remove = function (index) {
var name = $scope.data.Filters[index].FilterName;
// value of name = 'AAAA' or 'BBBB' and so on
$scope. data. Filters. splice (index, 1);
$scope.Json = angular.toJson($scope.data);
};
And my HTML is
<div><small>{{AAAA}}</small></div>
<div><small>{{BBBB}}</small></div>
<select class="BBBB"> <option> .... </select>
<select class="AAAA"> <option> .... </select>
Based on the value of name i want to reset the {{ }} vale in my view.
Say for an example Example
reset the value of {{AAAA}} if name = AAAA
so how can i use the variable name like below UPDATED
var name = $scope.data.Filters[index].FilterName;
$scope.name = "" /// How can i do like this
$(name).selectpicker('deselectAll');
Can anyone help me
Thanks,