const key = 'mDisplayName' let updatedData = [...new Map(data.map(item => [item[key], item])).values()]; updatedData.map((item)=>{ console.log(item); })