I have a lodash variable;
var usernames = _.map(data, 'usernames');
which produces the following;
[
"joebloggs",
"joebloggs",
"simongarfunkel",
"chrispine",
"billgates",
"billgates"
]
How could I adjust the lodash statement so that it only returns an array of unique values? e.g.
var username = _.map(data, 'usernames').uniq();
uniqBy
?_.uniqBy(data, 'username')
– Octachord