은승우

Update app.js

Showing 1 changed file with 3 additions and 3 deletions
......@@ -102,10 +102,10 @@ async function handleEvent(event) {
let jsonResponse = JSON.stringify(JSON.parse(body), null, ' ');
jsonResponse=jsonResponse.toString()
console.log(jsonResponse);
while(jsonResponse.indexOf('text\\')!=-1)
while(jsonResponse.indexOf('text')!=-1)
{
jsonResponse=jsonResponse.substring(jsonResponse.indexOf('text\\')+9);
text+=jsonResponse.substring(0,jsonResponse.indexOf("\\"))+" ";
jsonResponse=jsonResponse.substring(jsonResponse.indexOf('text')+5);
text+=jsonResponse.substring(0,jsonResponse.indexOf("}"))+" ";
console.log("text:"+text);
}
......