Convert JSON data to JSON data with an array replacing string

I have the following data:

{
"action":"Profile Updates",
"candidate_id":"1234",
"docs_verified":"ABC",
"skills":"PROF1_EN, blah, test"
}

I need the data in JSON format but I need the skills section as an array… how can I convert this JSON to one which has the skills section as an array?

I can separate just the skills but I’m unsure how to return this:

{
    "action": "Profile Updates",
    "candidate_id": "1234",
    "docs_verified": "ABC",
    "skills": ["PROF1_EN, blah, test"]
}

Answer

const obj = {
  "action":"Profile Updates",
  "candidate_id":"1234",
  "docs_verified":"ABC",
  "skills":"PROF1_EN, blah, test"
  }

const output = JSON.stringify({...obj, skills: [obj.skills]});

console.log(output)

We don’t know the context, but take it from here and massage it to your liking