i have one line code like this
$scope.selectItem.push(item['id']);
now i want check if item['id'] existing in $scope.selectItem splice it.
any idea Honorable
i have one line code like this
$scope.selectItem.push(item['id']);
now i want check if item['id'] existing in $scope.selectItem splice it.
any idea Honorable
Another possible solution:
if ($scope.selectItem.indexOf(item['id']) !== -1) // it exists