1

Im storing user data in AWS DynamoDB. One of the attributes is a List of Maps:

skills: [
   {
     name: 'foo'
   },
   {
     name: 'bar'
    }
]

How can I write a Scan that checks if skills have a map with name = foo?

I'm using DocumentClient

I have tried using contains but can't get it to work with Maps nested in a List:

let params: { 
  TableName: 'tablename',
  FilterExpression: 'contains(skills, :val)',
  ExpressionAttributeValues: {
    ':val': 'foo'
  }
}
Vingtoft
  • 13,368
  • 23
  • 86
  • 135

0 Answers0