How to remove dot dot in javascript and get data from that by Cucumber

When I run a commandline from AWS to get name and state it’s through for me like this:

const res = runAWS(args) (note: args is the place I verify line of AWS to run)

and the result is

......{
  stdout: '{rn' +
    '    "Name": "time",rn' +
    '    "ScheduleExpression": "12:00",rn' +
    '    "State": "VN",rn'
    '}rn',
  status: 0
}

Then I use JSON.parse(res.stdout) to look like more clear like this

 ......
    {
      Name: 'time',
      ScheduleExpression: '12:00',
      State: 'VN'
    }
    ...

But now when I get lastRun in cucumber, it’s through nothing for me,
also it show that: lastRun is not defind.
How can I get data from that json in cucumber please, that step is I write by myself. but now I dont know how to get lastRun like CUCUmber to save that data in a file.

please help me, thank you