I want to browse an array to check if the elements are repeated and then recover the last element .
const tabs = [
{ name: 'john', details:"john1" },
{ name: 'michael' , details:"michael1" },
{ name: 'beris' , details:"beris1" },
{ name: 'john' , details:"john2"},
{ name: 'john' , details:"john3"},
{ name: 'beris' , details:"beris2" },
{ name: 'beris' , details:"beris3" },
]
I would like to have as result
const tabs = [
{ name: 'john' , details:"john3"},
{ name: 'beris' , details:"beris3" },
]
michaelin the result? because it's not repeated?