title: Scan Dynamo DB with boto3 for array of dictionary
body: <p>Need to scan Dynamo DB having records with list of dictionary objects.
  Below is my sample data</p>
  
  <pre><code>'toAddr': [{'type': 'email', 'address': 'aaa@gmail.com'}, {'type': 'email', 'address': 'bbb@gmail.com'}]}
  </code></pre>
  
  <p>Below lines of code would do the needful for me.</p>
  
  <pre><code>client = boto3.resource('dynamodb')
  table = client.Table(table_name)
  response = table.scan(FilterExpression="contains (#items, :itemVal)",
                        ExpressionAttributeNames={"#items": "toAddr"},
                        ExpressionAttributeValues={":itemVal":{"address":"aaa@gmail.com",
                                                                type":"email"}})
  </code></pre>
  
  <p>However i would like to build the filter Expression in below format</p>
  
  <pre><code>response = table.scan(FilterExpression=Attr('toAddr').contains('itemVal'),
                        ExpressionAttributeValues={":itemVal":{"address":"aaa@gmail.com",
                                                      "type":"email"}}) 
  </code></pre>
  
  <p>But this would result in an error </p>
  
  <blockquote>
    <p>botocore.exceptions.ClientError: An error occurred (ValidationException) when calling the Scan operation: Value provided in ExpressionAttributeValues unused in expressions: keys: {:itemVal}</p>
  </blockquote>