I am trying to update an item by changing value of isRelevant to true:
var params = {
TableName: "test",
Key: {
"#date": data.Items[i].date.N,
"accountid": data.Items[i].accountid.S
},
UpdateExpression: "set #uu = :x",
ExpressionAttributeValues: {
":x": {"BOOL": false}
},
ExpressionAttributeNames: {
'#uu': "isRelevant",
'#date': "date"
}
};
docClient.update(params, function(err, data) {
if (err) console.log(err);
else {
console.log('worked');
}
});
What is wrong in this code? I tried all possible ways, but still not working!