Imagine having array of objects with n props having only to remove duplicate props with m same properties where m < n and use first of the two or more duplicates of the same unique constraint rule.
That's where science begins. Would be much more interested in hearing different solutions to this topic.
Imagine having array of objects with n props having only to remove duplicate props with m same properties where m < n and use first of the two or more duplicates of the same unique constraint rule.
That's where science begins. Would be much more interested in hearing different solutions to this topic.
Then write your own article an stop trying to sound smart on someone else's post
Simply use reduce and Map:
[{a: 1, b: 2, c: 3}, {a: 2, b: 3, c: 4}, {a: 1, b: 2, c: 5}].reduce((p, c) => p.set([c.a, c.b].join('|'), c), new Map()).values()
Edit: For selecting the first value, use Map.has before setting the value.