uniqBy

Get unique values from array using specific object key

Alternative name: unq.

var spells = [{ name : "fire", damage : 5},{ name : "ice", damage : 5}];
sb.uniqBy(spells,"name");
-> [ 'fire', 'ice' ]
sb.uniqBy(spells,"damage");
-> [ 5 ]

results matching ""

    No results matching ""