I am configuring a skill, for which Alexa need to speak out the list of objects recieved form an API.
Here is my sample code,
result = JSON.parse(data); while(result.d.results[i].werks == plant) { kpi[i] = result.d.results[i].kpiid; i++; } length = i; for(i=0;i<length;i++) { speechOutput[i] = kpi[i] ; callback(session.attributes, buildSpeechletResponse(header, speechOutput[i], repromptText, shouldEndSession)); }