const uniqArr = (arr, key) => {
return [
...new Map(arr.map(item => [item[key], item])).values()
]
};
More than 1 year has passed since last update.
Unique Array By Key 【JavaScript】
Last updated at Posted at 2022-06-28
Register as a new user and use Qiita more conveniently
- You get articles that match your needs
- You can efficiently read back useful information
- You can use dark theme
0