I want to store data attributes are threadId , threadType (sms, livechat ,fb) , createat and updateat how I define the threadType I follow this procedure but output displays all of the types of threadType?
and how to fix the time? this is manual input is there any method to get system time?
var doClient = new AWS.DynamoDB.DocumentClient();
var DynamoDB = new AWS.DynamoDB({});
var table = "thread";
var threadId = "3";
var threadType = "livechat";
var createDate = "11:38";
var updateDate = "12:00";
var channelName = "three";
var params = {
TableName : table,
Item:
{
"threadId" : threadId,
"threadType" : { "SS": ["sms", "livechat" ,"fb"] },
"createDate" : { 'S' : createDate },
"updateDate" : { 'S' : updateDate },
"channelName" :{'S' : channelName }
}
};
console.log("Adding a new item...");
doClient.put(params, function(err, data) {
if (err) {
console.error("Unable to add item. Error JSON:", JSON.stringify(err, null, 2));
} else {
console.log("Added item:", JSON.stringify(data, null, 2));
}
});
I need that only livechat display in a result of threadtype because in this insertion I need livechat