JSFiddle - React, Tailwind, and code Playground
JavaScript
var arr = [
{
title: 'anchorman'
},
{
title: 'happy gilmore'
},
{
title: 'anchorman'
}
];
var temp = {}, newArr = [];
for(var k =0;k< arr.length; k++){
if(temp[arr[k].title]){
newArr.push(arr[k]);
}
temp[arr[k].title] = true;
}
console.log(newArr);