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
You can use lodash to remove duplicate objects:
import * as _ from 'lodash'; _.uniqBy(data, 'id');
Here 'id' is your unique identifier
id