I have an array of objects that I would like to trim down based on a specific key:value pair. I want to create an array that includes only one object per this s
key:value
using lodash you can filter it out easily
lodash
the first parameter will be your array and second will be your field with duplicates
_.uniqBy(arrayWithDuplicates, 'color')
it will return an array with unique value