0
我工作的一個項目,我們正在使用Dynamodb數據庫和我有這個結構的文檔:搜索在dynamodb列表中使用的NodeJS
{
"shop_id": "hh-delightme",
"shoppers": [
{
"email": "[email protected]",
"name": "hatim haffane"
},
{
"email": "[email protected]",
"name": "bxdsf sdf sd f"
}
]
},{
"shop_id": "it-delightme",
"shoppers": [
{
"email": "[email protected]",
"name": "hatim haffane"
},
{
"email": "[email protected]",
"name": "bxdsf sdf sd f"
}
]
}
我有兩個指數法的店ID-指數和電子郵件的指數,所以我想要做的是在shop_id「HH-delightme」
電子郵件「[email protected]」來獲得shoper我想這代碼,但沒有成功
var params = {
TableName:"shopper",
KeyConditionExpression:"shop_id = :shop_id AND email = :email",
ExpressionAttributeValues: {
":shop_id":store,
":email":email
}
};
docClient.query(params, function(err, data) {}
任何一個可以幫助我做到這一點,謝謝