Skip to content

Instantly share code, notes, and snippets.

@MorenoMdz
Created January 9, 2021 01:04
Show Gist options
  • Save MorenoMdz/812540380b3349fc0cb43fab4d421431 to your computer and use it in GitHub Desktop.
Save MorenoMdz/812540380b3349fc0cb43fab4d421431 to your computer and use it in GitHub Desktop.
Create a Set from an Array of Objects Javascript
const users = redeem.data.map(item => item.employeeProfile);
const uniques = new Set(users.map(e => JSON.stringify(e)));
const uniqueUsers = Array.from(uniques).map(e => JSON.parse(e));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment