은승우

Update app.js

Showing 1 changed file with 2 additions and 3 deletions
......@@ -99,12 +99,11 @@ async function handleEvent(event) {
request.post(options, function (error, response, body) {
let jsonResponse = JSON.stringify(JSON.parse(body), null, ' ');
jsonResponse=jsonResponse.toString()
console.log(jsonResponse);
text='';
while(jsonResponse.indexOf('text')!=-1)
{
jsonResponse=jsonResponse.substring(jsonResponse.indexOf('text\\')+7);
text+=jsonResponse.substring(0,jsonResponse.indexOf("\\")-1)+" ";
jsonResponse=jsonResponse.substring(jsonResponse.indexOf('text\\')+9);
text+=jsonResponse.substring(0,jsonResponse.indexOf("\\"))+" ";
}
......