You can use map
The map() method creates a new array with the results of calling a provided function on every element in the calling array.
const graphicDetails = [{"hour": 0,"businessOperationPlansTotalDemand": 8.201753196882908,"employeesCount": 0,"businessOperationPlans": [{"name": "operation0","value": 5.999355066255491 }, ] }, {"hour": 1,"businessOperationPlansTotalDemand": 7.450044665662842,"employeesCount": 3,"businessOperationPlans": [] }];const newData = graphicDetails.map(a=>{return {x:a.hour,y:a.businessOperationPlansTotalDemand,businessOperationPlans:a.businessOperationPlans };})console.log(newData);