javascript map return array with distinc values

//ES6
let array = [
  { "name": "Joe", "age": 17 },
  { "name": "Bob", "age": 17 },
  { "name": "Carl", "age": 35 }
];
array.map(item => item.age)
  .filter((value, index, self) => self.indexOf(value) === index)

> [17, 35]

4.2
5
Whippoorwill 105 points

                                    const unique = [...new Set(array.map(item => item.age))];

4.2 (5 Votes)
0
Are there any code examples left?
Create a Free Account
Unlock the power of data and AI by diving into Python, ChatGPT, SQL, Power BI, and beyond.
Sign up
Develop soft skills on BrainApps
Complete the IQ Test
Relative searches
javascript get unique values from key map with unique keys javascript unique key in array javascript get unique values from object js javascript map unique keys get unique values javascript unique key js js get unique key for object get unique value from object javascript get unique key in array of objet javascript get array of unique objects based on single key value javasscirpt how to get unique keys from an object in javascript get a unique key jacascript js get the number of unique dict values javascript array get values with unique property value js get unique keys from array of objects js map unique keys how to get only unique values from object in javascript array unique using key in nodejs unique key javascript how to get unique keys values from a list of dictionary in js unique keys and values javascript js get uniques from array how to get unique values from array in javascript javascript get unique keys from array of objects js unique keys js get unique values from object array generate unique key from object javascript js unique array by key get unique key value from array of objects javascript get unique values from dictionary javascript javascript dictionary get only unique values javascript how to form an array that unique key of field javascript dictionary unique values how to pick the unique key value from array of object javascript how to pick the unique key from array of object javascript js get unique values from array js unique dict keys get unique value key from object javascript javascript get unique values print unique value by key in javascript find unique object key value in aray javascript reduce object to include only unique keys select distinct object from an array select unique entry from array return unique items in list javascript key value get the objects that are unique array typescript extract distinct key from dictionary javascript javascript array unique object javascript get unique objects from array js map unique javascript get distinct values from array of objects by 2 properties javascript get distinct object from array of objects js 2 array object get unique jquery get unique values from array of objects how to filter unique numbers from array js typescript using array map to get unique values unique array or objects unique values from an array javascript map array of data and get unique values using javascript using map get unique item from array javascript filter array by unique object value javascript array filter unique by property javascript filter unique values from array of objects javascript make an unique array of values in object of objects $.map distinct How to get distinct values and repetition from an array of objects in JavaScript? how to make array of objects unique in javascript javascript distinct property how to make a map with unique elements javascript how to add items to typescrupt array with unique key get distinct array of objects javascript js objects unique function to find distinct in javascript how to distinct a list of object in js javascript object array get distinct values unique object in array javascript javascript array of objects get unique values return unique values in array javascript key value list of unique objects javascript jquery get distinct values from array of objects get unique object from array in javascript using key value js filter array of object based on unique attribute get unique object array list javascript unique array of objects javascript and return specific property javascript get unique items in array of array find unique elements in aray of object based on property js filter uniq array of objects with value get unique items by key from list js distinct arrya of objects array of oject make unque get only uniqe form array object javascript array of objects get unique property javascript unique values in array of objects angular finding unique values from an array object faster way array of objects unique in js javascript map return two values unique array javascropt how to get 4 unique values from array of object in javascript how to find 4 unique item in array of object in javascript extract unique properties javascript How to get distinct values from an array of objects in JavaScript? filter object by unique object value filter by unique object in javascript arrays unique object filter javascript get unique array objects from array of objects js get unique elements of array array map unique values only generate unique id from string javascript unique values in array of objects only how to get unique record from table1 in javascript js array of objects find unique values spring get unique object from array javascript filter unique values in array rea Distinct objects by property value from an array of objects how to get unique values in array of objects in react js how to get unique values in array of objects in javascript how to convert list of object in map using javascript distinct values with sub value how to convet list of object in map using javacerip distnic value unique values in an object js array of unique values from key in array of objects js distinct from array data.map unique values omnly javascript map array of objects unique javascript get distinct values from array of objects angular array object distinct how to get unique values in array in js javascript array of objects with unique property javascript filter unique objects key unique object values unique list of objects javascript how to get unique objects from array in javascript typescript get distinct values from object array javascript filter array for unique values of objects get unique values while mapping over array javasc object.values javascript .unique distrinct get unique values from array of objects react distinct javascript array object get all unique values from array of objects javascript excluding undefined get list of distinct keys from list of objects js unique elements of 2 objects arrays nodejs unique value of array with objects js javascript list of unique values from list of objects get only valye from key value current recors in javascript how to find unique item in array of object in javascript javacript uniq object in array js find unique properties of object array filter unique objects by key javascript how to seperate unique id objects from a given data array angular get unique values from array of objects js filter unique objects in array unique array of objects js for value unique array of objects js js objects array return unique keys js objects array return unique js es6 get unique values from array with objects filter an array of objects javascript to have unique items array objects by id unique values typescript array objects by id unique values t ypescript angularjs distinct array of objects js unique objects in array .unique() javascript javascript assign distinct objects array distinct of object javascript unique objects form array uniq object js get unique from array of objects javascript filter an object to get unique values array unique key javascript get unique values from object arry javascript get unique values from json array typescript how to make an object values uniq in javascript how to make an object uniq in javascript extract unique objects by attribute from array of objects. angular distinct array by property angular distinct array filter array of objects get unique values unique value object collection get distinct values from array javascript typescrip array map unique only get unique values in array of objects javascript check how many unique values are in array javascript unqiue array by object key unique array based on key javascript js unique objcet array object unique javascript js map unique values get unique from array javascript es6 unique array of objects by key distinct value fomr array of object js array of object uniq get unique objects javasript how to get unique objects javascript create unique array from array of objects js how to make get unique objects based on value javascript how to make get unique object values javascript array of objects unique valies angular unique object by key in array angular uniq object by key in array typescript uniq object by key in array find unique values in array of objects javascript find unique objects in an arrray array of only unique objects javascript return unique elements from an array in javascript js get unique values from array of objects javascript distinct array object javascript filter object unique strings javascript filter object unique unique object in array js typescript unique array by key filter uniqe object array get distinct objects in array javascript javascript array of objects distinct javascript distinct object based on properties how to return unique keys in javascript how to show the unique data from the map in javascript typescript unique array of objects find unique number in array es6 javascript array unique objects js araay get unique elements map array with unique key filter array of objects unique js get all uniq properties of an array of object get unique values from matrix javascript can you grab unique objects javascript get unique objects javascript unique array of object javascript javascript select distinct from array of objects get uniq values from object array select unique values in an array of objects typescript unique array object value how to make unique array in javascript uniq array of onjects JS typescript distinct by property javascript get unique values from object array generate unique id for arr array of objects javascript array distinct by key typescript unique objects array javascript distinct entries javascript object get unique values angular return unique array of objects javascript js array distinct objects unique and filter function js array of objects typescript unique object array get unique values from array of Abject js get unique value in an object get unique objectsin array javascript how to filter an array of objects for unique js javascript get unique values from array of strings typescript map distinct javascript get distinct objects from array based on one property how tobget unique value form the arrar get distinct objects by property javascripts unique element in object javascript unique element in an array of objects javascript data map distinct javascript get unique objects from array of objects javascript get unique items in array js array filter unique objects distinct objects by property value from an array of objects javascript distinct array into object javascript javascript array of objects get unique by an attribute javascript filter distinct objects typescript array distinct by property javascript unique object key js array distinct on property js get array unique key make unique array in javascript javascript get all unique values from object array nodejs unique array of object filter unique value from array of object js javascript array distinct by property javascript map unique get distinct values from array with filter javascript get all the unique id from array of objects javascript array get unique objects by property get unique values from array of objects how to make an array of objects unique based on one field of object get uniques entries in array of object get unique objects from array of object get all unique values from array of objects javascript find unique values from array of objects js find unique values from array of objects Get all unique values in JavaScript arrays filter for getting unique values from array distinct in javascript array unique object array javascript distinct list of object properties javascript return unique array of objects js js how to make elements in an array unique unique strings in list javascript array of unique objects javascript filter on distinct id jquery object array distinc value array of object distinct object id javascript distinct values of object property jquery javascript onject array distinct values js filter unique objects unique from array of objects using filter js get unique year in objects array javascript filter array of object on distinct values and get unique year object in array javascript distinct object array javascript get unique object in array javascript javascript extract unique values from array of objects how to uniq array of objects react javascript unique objects in objects js filter array of objects by unique property add all unique values in array of objects javascript unique object javascript filter out unique objects in array javascript angular distinct array of objects js unique properties js distinct properties object js distinct keys object js get distinct keys object how to get unique values in map from array javascript get unique keys from array of objects javascript how to extract unique values from objects in js pull out unique values id in array of objects javascript how to get array of object values based on unique property in using lodash how to get array of object values based on unique property in JS javascript array unique property get unique values from associative array javascript filter array with unique objects javascript unique array javascript es6 Map filter objects by unique values of a field in an array of objects js filter by unique values of a field in an array of objects js filter distinct column from array js TypeScript distinct array of objects by property typescript array distinct property map unique javascript filter unique objects in array javascript how to get unique values from array in angular 6 array filter unique objects iterate through an array of objects and get only the object with non-repeating distinct value return distinct in angular javascript array unique by property find distinct elements in array javascript javascript unique array of objects by property javascript get unique property values from array of objects with condition javascript get unique property values from array of objects get unique values from object array javascript java script uniq array of objects unique javascript get distinct values from array typescript unique array objects javascript javascript unique object property values in array javascript unique object in array javascript unique object all properties return whole object javascript unique object all properties distinct array of objects javascript typescript distinct array of objects distinct object in map javascript array object unique javascript set get unique value from object based on key javascript javascript get distinct property values select unique values from array of object javascript return unique array of strings javascript get all unique values from array of objects push uniq data using map method in javascript lodash unique values in array of objects javascript + filter array of objects + keep unique JS get disinct first object key in array JS return unique objects get unique objects from array of objects javascript JS how to get distinct object from array JS get distinct values from array and return object map unique ids to a list javascript JS select unique objects from property distinct element from array of objects fetch distinct records in array of object acc to key should have a unique key in array of object in javascript check should have a unique key in array of object in javascript distinct from array of objects with same key get unique value of a field in array of objects javascript js distinct array of objects how to extract only unique values from property in object javascript pull uniques objects from two array js javascript array objects + unique get all unique value in an array of objects js array objects unique js map field distinct js unique rows from object array js distinct list of years from an array of dates unique list of values javascript unique array object javascript js get unique objects from array javascript unique data attribute js array map distinct values javascript distinct array of objects by property javascript filter unique objects how to return distinct values in array map function js js unique array best distinct array javascript javascript get distinct values from object es6 get unique values from array of objects to array javascript map distinct value from object javascript filter array of objects unique return unique name values from objects in array in javascript return unique values from objects in array in javascript how to return unique array of of object in javascript typescript get unique row from object array unique array of objects javascript get array of unique values from array of objects angular 8 filter unique array of objects in lodash check if all objects in array is unique javascript javascript object distinct javascript array filter unique object property unique results in a array of objects in typescript js array of objects unique array map distinct get unique values from array of objects javascript typescript get unique values from array of objects javascript unique array javascript make sure object value is unique how to add only unique elemts from an array depending on object key javascript find all different values in array how to get unique values from array of objects javascript js unique array of strings get unique value from array of object js how to get unique values in an object node javascript array int unique javascript get unique array of objects unique objects in array javascript get unique values from array in javascript array list unqieu value nodejs get unique values from array js javascript get unique values from array javascript array distinct values unique array map filter unique values from array of objects javascript filter unique values from array of objects get distinct values from list of objects typescript javascript get unique values from array of objects unique value with map in javascript map only unique values javascript js map object to new object unique only js map to new object uniue only javascript getuniquevariables how to iterate through object and check if unique values get unique values from object valuesjavascript get unique object values javascript foreach filter distinct js filter distinct object value js filter distinct value js javascript array of objects unique object property how to get distinct values from list in javascript javascript map return array with distinc values get unique values of one key value from array of objects get unique values from object es6 find uniq From array on particular key get unique elements in array javascript find unique with particular key in array get unique strings from arra in js js reduce uniwur array of objects js unique array of objects javascript get unique objects in an array array object unique javascript list push unique dict javascript find unique elements in array javascript check for unique js objects in array distinct value in large array javascript js unrepeated array number filter unique values in object javascript filter unique values on object javascript javascript find unique objects in array javascript get unqiue values javascript filter unique objects in array ts array distinct key js array distinct key javascript unique object from 2 array find uniq value in array ts distinct object array js key value get unique unique array element from array object javascript distinct based on id how to distinct in javascript by id find unique objects in array javascript distinct string in array javascript javascript distinct object array javascript unique array of objects check unique javascript key value in object check unique values in array of objects check unique value in array of objects how to get unique values in array javascript find unique key value pair in javascript array javascript object unique unique array of objects by key find unique keys in array of objects get distinct values in array typescript select distinct values filter javascript array of objects javascript find unique values in array of objects array unoique js javascript get all unique values from array of object javascript get all unique value from array of object get unique object from array javascript ts reduce object array distinct list javascript list distinct properties get unique values from array javascript javascript distinct array of objects filter unique values in array of objects javascript javascript map distinct to array get unique objects in array javascript get unique array of objects javascript distinct in array angularjs to specific attributes typescript map unique javascript unique objects in array javascript unique array of objects by value get distinct values from array of objects javascript get uniue objects from arrayu of objects from the lkkeys typescript distinct object array keep arrya of object unique javscrip[t filter array of objects by unique property js array of object unique how to get distinct values from an array of objects in javascript
Made with love
This website uses cookies to make IQCode work for you. By using this site, you agree to our cookie policy

Welcome Back!

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign in
Recover lost password
Or log in with

Create a Free Account

Sign up to unlock all of IQCode features:
  • Test your skills and track progress
  • Engage in comprehensive interactive courses
  • Commit to daily skill-enhancing challenges
  • Solve practical, real-world issues
  • Share your insights and learnings
Create an account
Sign up
Or sign up with
By signing up, you agree to the Terms and Conditions and Privacy Policy. You also agree to receive product-related marketing emails from IQCode, which you can unsubscribe from at any time.
Creating a new code example
Code snippet title
Source