JSFiddle - React, Tailwind, and code Playground

by sandro_paganotti

JavaScript

const marks = {
    mark_01: {
      x: 10,
      y: 200
    },
    mark_02: {
      x: 200,
      y: 100
    },
    mark_99: {
      x: 1000,
      y: 1039
    }
  };

const edited = Object.fromEntries(Object.entries(marks).map(
	([k,{x,y}]) => [k,{x: x+10, y: y+10}]
));

console.log(edited);