Я хочу сохранить в DynamoDB массив данных в массиве, который уже существует, но не может найти способ.
Я пытаюсь развить навык для Алексы.В этом навыке я храню данные ежедневно по разным причинам.Во-первых, я пытаюсь использовать массив с датой каждого используемого дня.Внутри этого массива я пытаюсь сохранить другой массив информации, но все, что я могу получить, это дата дня.Больше ничего не сохраняется.
function LogicSystem (handlerInput) {
const attributesManager = handlerInput.attributesManager;
const requestAttributes = attributesManager.getRequestAttributes();
let sessionAttributes = attributesManager.getSessionAttributes();
// Get the actual date (yyyy/mm/dd) to pass it as a variable name inside the array of data.
let newdate = GetDate();
const DiagnoseTest = [
Memory = [
Question = 0,
State = 'Done'
],
Logic = [
Question = 0,
State = 'Done'
]
}
//Save the Diagnose Test created in the memory of the day
sessionAttributes.DiagnoseTest[newdate].Exercises = DiagnoseTest;
attributesManager.setSessionAttributes(sessionAttributes);
return sessionAttributes;
}