我想在DynamoDB中存储一个已经存在但无法找到方法的数据数组。
我正在尝试开发alexa的技能。由于各种原因,我每天都会存储数据。首先,我尝试使用包含每天使用日期的数组。在这个数组中,我试图存储其他信息,但是我所能获得的只是当天的日期。没有任何进一步的存储。
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;
}