Skip to content

Instantly share code, notes, and snippets.

@akumbhani66
Created August 1, 2019 06:56
Show Gist options
  • Save akumbhani66/a2f01dc2f4154d809c50fe57bd46ef53 to your computer and use it in GitHub Desktop.
Save akumbhani66/a2f01dc2f4154d809c50fe57bd46ef53 to your computer and use it in GitHub Desktop.
Removing duplicate entries from array of object by one of object key.
const uniqueAddresses = Array.from(new Set(arrayTemp.map(ele => ele.a))).map(subEle => {
return arrayTemp.find(ele => ele.a === subEle)
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment