console.log(JSON.stringify(body));
this is a log from above code.
"{\"result\":{\"normal\":0.002,\"soft\":0.776,\"adult\":0.222}}"
this is a result of json String but I can't how to parsing normal, soft, adult value
console.log(JSON.stringify(body));
this is a log from above code.
"{\"result\":{\"normal\":0.002,\"soft\":0.776,\"adult\":0.222}}"
this is a result of json String but I can't how to parsing normal, soft, adult value
To parse the JSON string just use indexing on the key's value. Something like this would help you retrieve the value of normal in the JSON object:
console.log(body['result']['normal']);
Read up more about the JSON object and how to handle them: https://www.w3schools.com/js/js_json_objects.asp