const newData = JSON.parse(
JSON.stringify(data),
(key, value) => key === 'value' ? 'new value' : value
);
var offsetTop = Element.getBoundingClientRect().top + document.body.scrollTop;
<html>
<head>
<title>afdafasdfasd</title>
</head>
<body>
<div>11</div>
<div>11</div>
<div>11</div>
<div>11</div>
<div>11</div>
<div>11</div>
<div id='test'>TESTTESTTEST</div>
<script type="text/javascript">
console.log(document.getElementById('test').getBoundingClientRect().top + document.body.scrollTop);
</script>
</body>
</html>