const result = {
type: 'mobile',
id: 'tsy152ivm',
score: 55
}
const links = JSON.parse(localStorage.getItem('links'));
const item = links.find(item => item.id === result.id);
//localStorage.setItem('links', JSON.stringify(item));
Object.assign(links.find(item => item.id === result.id), result)
localStorage.setItem('links', JSON.stringify(links))
links[links.findIndex((item) => item.id === result.id)] = result;
localStorage.setItem('links', JSON.stringify(links));