I would like to use Underscore.js to determine if an instance of an object is present in an array.
Usage example:
var enrollments = [ { userid: 123, courseid: 456, enrollmentid: 1 }, { userid: 123, courseid: 456, enrollmentid: 2 }, { userid: 921, courseid: 621, enrollmentid: 3 } ]
I want to be able to identify a unique registration in which the user IDs and courseid match.
So, basically, given the list of applications, I can remove duplicates based on matches with the user ID and courseid, but not with the registration ID.
source share