I am new to javascript and I tried like using distinct but its not what im looking for
example array:
let arr = [ {key:\"1\",value:\"dog\"},
Using the "find" method, you will get exactly what you are looking for "{key:"2",value:"cat"}".
arr.find((item, index) => { const foundDup = arr.find((s, sIndex) => sIndex !== index && s.key === item.key); return !foundDup; });