What if we just sorted both arrays based on some criteria, like name, and then compared them.  Seems like that would be cleaner.  I think you can accomplish the sort by doing something like userTitle.sort(function (a, b) { return a.name < b.name; })