Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

filter repetition 2d array javascript

var arr = [[7,3], [7,3], [3,8], [7,3], [7,3], [1,2]];

arr.map(JSON.stringify).reverse().filter((e, i, a) => a.indexOf(e, i+1) === -1).reverse().map(JSON.parse) // [[7,3], [3,8], [1,2]]
Comment

PREVIOUS NEXT
Code Example
Javascript :: filter repetition multidimensional array javascript 
Javascript :: jquery on scroll 
Javascript :: javascript switch assignment 
Javascript :: status 502 bad api gateway error solution for aws lambda 
Javascript :: nested array filter 
Javascript :: js string methods 
Javascript :: write to file but dont overwrite fs.writeFile node 
Javascript :: nodejs call api 
Javascript :: radio button getelementsbyname 
Javascript :: npm run build serve 
Javascript :: clear element children js 
Javascript :: mongoBD $inc operator 
Javascript :: import react 
Javascript :: warning React Hook useEffect has a missing dependency: 
Javascript :: jquery countdown timer 
Javascript :: how to stop re rendering in react 
Javascript :: Could not find a production build in the 
Javascript :: merge 2 array of object by key 
Javascript :: how to chunk a base 64 in javascript 
Javascript :: react native grid view 
Javascript :: mongoose return only a certain number of results 
Javascript :: how to merge two object arrays in javascript 
Javascript :: user icon discord js 
Javascript :: javascript check string lenght 
Javascript :: jquery use variable in string 
Javascript :: check href javascript 
Javascript :: sum of array of number 
Javascript :: javascript size array 
Javascript :: regrex match emails 
Javascript :: eslint disable tag 
ADD CONTENT
Topic
Content
Source link
Name
6+5 =