I m using node typescript and local dynamodb. I'm unable to get a specific nested document.
I m trying to get a post on the basis of id. I m using email as pk.
let params1:any= {
TableName: "userTable",
// Key: {
// email: event.body.email
// },
FilterExpression: "#posts[0].#id = :postId",
// KeyConditionExpression: `#postId= :postId`,
ExpressionAttributeNames: {
"#posts": "posts",
"#id": "id",
},
ExpressionAttributeValues: {
":postId": event.body.id
},
}