Remove duplicates from an array using Lodash
To remove duplicates from a simple array, we can use sortedUniq() method provided by Lodash.
// import lodash import _ from "lodash"; var arr = ["one", "two", "one", "three", "one", "two", "one"]; console.log(_.sortedUniq(arr)); // => ["one", "two", "three"]