We've successfully developed a script to eliminate duplicate strings from an array while preserving the order necessary for angular's ng-repeat loop. It's also important that the remaining elements maintain their original index.
scope.feedback = _.map(_.pluck(item.possibleAnswers, 'feedback'), function (element, index, collection) {
return collection.slice(0, index).indexOf(element) === -1 ? element : '';
});
Although this code is functional, we can't help but think there may be a simpler solution out there. Has anyone encountered a similar issue and found a more straightforward workaround?