How to edit json file in javascript

Viewed 39

I have a json file that is generated dynamically, i would like to add "unit_detail:" before each key in the json file via javascript

{
  "region": 5,
  "teamColors": [
    "#7fc3a5",
    "#b8feff",
    "#376d8b"
  ],
  "livery": {
    "value": "none"
  },
  "body": {
    "value": "body2",
    "color": "#efc5af"
  },
  "truck": {
    "value": "baseball4"
  },
  "wheel": {
    "value": "wheel7",
    "size": 31.29
  },
  "aero": {
    "value": "aero3",
    "color": "#efc5af"
  },
  "line": {
    "value": "line4"
  },
  "topLine": {
    "value": "tLine",
    "size": 1.26
  },
  "midLine": {
    "value": "none"
  },
  "engine": {
    "value": "petrol"
  }
}

Is there a way to insert "unit_detail:" before each of the keys?

0 Answers
Related