Skip to content

Instantly share code, notes, and snippets.

@4mitch
Created August 31, 2017 10:09
Show Gist options
  • Save 4mitch/96aef7809bd1bbd544b87fa9f29cd0ae to your computer and use it in GitHub Desktop.
Save 4mitch/96aef7809bd1bbd544b87fa9f29cd0ae to your computer and use it in GitHub Desktop.
Find uniq values of property in array of objects
var array = [
{ name: "Joe", age: 17 },
{ name: "Bob", age: 17 },
{ name: "Carl", age: 35 }
];
console.log(new Set( array.map((obj) => obj.age)) )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment