title: How to Filter Nested Array Object in DynamoDB
body: <p>I am very beginner to AWS DynamoDB, I want to scan the DynamoDB with SENDTO.emailAddress = "first@first.com" as FilterExpression. </p>
  
  <p>The DB Structure looks like this</p>
  
  <pre><code>{
      ID
      NAME
      MESSAGE
      SENDTO[
          {
              name
              emailAddress
          }
      ]
  }
  </code></pre>
  
  <p>A Sample Data</p>
  
  <pre><code>{
      ID: 1,
      NAME: "HELLO",
      MESSAGE: "HELLO WORLD!",
      SENDTO: [
          {
              name: "First",
              emailAddress: "first@first.com"
          },
          {
              name: "Second",
              emailAddress: "second@first.com"
          }
      ]
  }
  </code></pre>
  
  <p>I want to retrieve document that match emailAddress. I tried to scan with filter expression and here is my code to retrieve the data. I am using AWS Javascript SDK.</p>
  
  <pre><code>let params = {
      TableName : "email",
      FilterExpression: "SENDTO.emailAddress = :emailAddress",
      ExpressionAttributeValues: {
          ":emailAddress": "first@first.com",
      }
  }
  
  let result = await ctx.docClient.scan(params).promise();
  </code></pre>