i am new in nodejs (using expressjs) and i am calling a rest api,i am getting response as json in console(with two keys "id" and "text") but now i want to get "text" from json response and want to pass in "assistant.ask",How can i do this ?
Here is my code
function (error, response, body) {
if (!error && response.statusCode == 200) {
console.log(body); //working
assistant.ask(body.text); // not working
}
else{
console.log(error);
}