// Я могу получить доступ к свойству AccountSite из других обработчиков / функций в файле, используя циклы, кроме этой функции.Я могу получить все другие свойства, используя циклы в функции, кроме этой.
// Я попробовал Мой код в visual studio, используя console.log для отладки вместо Say (в Alexa), и я могу получить доступ ксвойство с точным кодом, за исключением этого изменения.
const Data = [{
AccountName: "Jhon Doe ",
Phone: "353262",
Website: "something.com",
AccountSite: "Random Name",
Description: "Random Description",
AccountOwner: "Jhondoe@yahoo.com"
},
{
AccountName: "Jane Doe ",
Phone: "353223462",
Website: "something2.com",
AccountSite: "Random Name2",
Description: "Random Description2",
AccountOwner: "Janedoe@yahoo.com"
},{
AccountName: "Susan Doe ",
Phone: "353232462",
Website: "something3.com",
AccountSite: "Random Name3",
Description: "Random Description3",
AccountOwner: "susandoe@yahoo.com"
},
];
const getAccounSite_Handler = {
//handler code
//handler code
//handler code
let say;
Data.map(pos => {
say= ` ${pos.AccountSite}`; //if I put pos.Propertyname it would give me the property for the last object in the array for the other propert name except accountsite
// Account site is accessible in this handler if I don't use a loop
//have tried for loop and map
//have a very similar code for another skill but it is working; it is accessing the properties
//end of the handler
}
When I run Alexa it says "There was a problem with the requested skill's response" when the handler is called