add new property to object using lodash code example
Example 1: Lodash remove duplicates from array
var users = [
{id:1,name:'ted'},
{id:1,name:'ted'},
{id:1,name:'bob'},
{id:3,name:'sara'}
];
var uniqueUsersByID = _.uniqBy(users,'id'); //removed if had duplicate id
var uniqueUsers = _.uniqWith(users, _.isEqual);//removed complete duplicates
Example 2: lodash map
const _quote_filter = _.map(quote_state, (val, key) => { if (val) { return key }})console.log(_quote_filter) //=> [ 'btc', undefined, undefined ]