如何遍历对象并更改数据集中的属性键

我有一组数据需要根据我想要的特定格式重新格式化。 以下是我正在接收的数据格式。

      const recieved = [
    {
      "name": "1PM Industries Inc ",
      "series": [
        {
          "value": 0.0001,
          "name": "2019-08-30"
        },
        {
          "value": 0,
          "name": "2019-08-28"
        }
      ]
    }
  ]

What i need to do is iterate through all object property keys "name", "series", "value" and change them to "id", "data" , "x" and "y" respectively.

Below is the format of data that i want the above data set to be changed. I need the "name" to be replaced with "x" and "value" should be replaced with "y"

  const columns = [
    {
      "id": "japan",
      "data": [
        {
          "x": "plane",
          "y": 45
        },
        {
          "x": "helicopter",
          "y": 253
        }
      ]
    }
  ]

I found out that we can access property keys of objects by Object.keys

  function formatData(columns) {
    columns.map(col => {

    })
  }

在数据格式化方面,我发现自己处境非常艰难。希望有人可以帮助我。谢谢