0
두 개의 슬롯을 함수에 전달 중입니다. 나는 다음 XML을 보내고있다.슬롯 값에서 '정의되지 않음'을 얻습니다 (nodejs 람다를 사용하는 Alexa)
다음은 요청 XML입니다.
"requestId": "amzn1.echo-api.request.[unique-value-here]",
"intent": {
"slots": {
"chapter": "4",
"shloka": "4"
},
.....
코드가 실행 그러나
, 나는 슬롯에 대한 정의는 무엇입니까 는 ..... 심지어 그들이 거기에 생각했다. 여기 슬롯은 ... 여기에 코드를var intent = this.event.request.intent;
console.log('slots are -->');
console.log(intent.slots);
var shloka = this.event.request.intent.slots.shloka.value;
var chapter = this.event.request.intent.slots.chapter.value;
console.log('chapter:' + chapter + ' shloka:' + shloka);
인 콘솔 로그 입니다 -> ... {장 : '4', shloka : '4'} ... 장 : 정의되지 않은 shloka : 정의되지 않음
이 문제를 해결하는 방법을 알 수 없습니다.
감사합니다. 모든 아마존 예제는 .value를 가지고 슬롯을 검색합니다. 왜 작동하지 않는지 궁금합니다. 어쨌든 고마워. – user1544687