This is the query:
var params = {
TableName : "events",
KeyConditionExpression: "event = :event",
ExpressionAttributeValues: {
":event": "florida"
}
};
db.query(params, function(err, data) {
if (err) console.log(err, err.stack);
else console.log(data);
})
This is the error:
message: 'Query condition missed key schema element: id', code: 'ValidationException',
What am I doing wrong here?
Table looks like this:
id division_id event
1491934519379 111222 florida
1491934895527 222111 florida
1491936271559 232123 earthquake
1491936037958 543335 los angeles
1491936037957 554334 los angeles