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) {}
任何一个可以帮助我做到这一点,谢谢