I have a list in variable like:
var name_list = some_list
console.log(name_list)
Array[3]
0: Object
name: "Johny"
1: Object
name: "Monty"
2: Object3:
name: "Johny"
I want to get the list with non repetitive list.
How can I do this ?
Update
I tried with this..
var unique_name = [ ...new Set(name_list.map(name => {
return name.name
}))]
It works fine but I want the object that are filtered unique according to name.
Any idea ??
[ ...new Set(array) ][ ...new Set(array) ]doesn't work?