Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

unique array javascript es6 Map

const data = [
  { group: 'A', name: 'SD' }, 
  { group: 'B', name: 'FI' }, 
  { group: 'A', name: 'MM' },
  { group: 'B', name: 'CO'}
];
const unique = [...new Set(data.map(item => item.group))]; // [ 'A', 'B']
Comment

PREVIOUS NEXT
Code Example
Javascript :: hwo to create an array filled with sequencial numbers 
Javascript :: js replace broken image 
Javascript :: checkbox click event jquery 
Javascript :: neo4j delete node by id 
Javascript :: check if radio button is checked 
Javascript :: javascript get date of last monday 
Javascript :: sqlite3 multithreading nodejs 
Javascript :: Only numbers or string. Input field in React 
Javascript :: htmlWebpackPlugin.options.title 
Javascript :: detect keypress javascript 
Javascript :: prime factorization javascript 
Javascript :: afficher un div qui etait cache en javascript 
Javascript :: material ui input placeholder color 
Javascript :: how to execute javascript after c# function execute 
Javascript :: como remover uma variável de um json 
Javascript :: prepend element jquery 
Javascript :: document.getelementbyid.onclick 
Javascript :: Laravel csrf token mismatch for ajax POST Request 
Javascript :: js foreach determine if last 
Javascript :: scrolltop top to bottom body get count 
Javascript :: javascript make beep 
Javascript :: react native linking phone call 
Javascript :: js reduce concat numbers 
Javascript :: Playing sound in Vue.js 
Javascript :: how to get name array value checked in jquery 
Javascript :: center horizontally react native 
Javascript :: window.ReactNativeWebView.postMessage 
Javascript :: string to date angular 
Javascript :: for loop display array 
Javascript :: how to update angular version 
ADD CONTENT
Topic
Content
Source link
Name
7+2 =