Hi @F_Z_ ,
{Action: "bbb", Body: "bbb"} is a object.
{"Action":"bbb","Body":"bbb"} is a JSON string.
The conversion between the two can be achieved through the JSON.parse() and JSON.stringify() methods.
console.log(JSON.stringify({Action:"bbb",Body:"bbb"}));
output
'{"Action":"bbb","Body":"bbb"}'
const json = '{"Action":"bbb","Body":"bbb"}';
const obj = JSON.parse(json);
console.log(obj);
output:
Object { Action: "bbb", Body: "bbb" }
Best regards,
Lan Huang
If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.