title: How do I filter nested List of Map items from dynamoDB in python dynamically
body: <p>How do I filter nested List of Map items from dynamoDB in python dynamically.</p>
  <p>Below is the Json document.</p>
  <pre><code>&quot;Items&quot;: [
  {
    &quot;shows&quot;: [
      &quot;first&quot;,
      &quot;second&quot;
    ],
    &quot;area&quot;: [
      {
        &quot;areaCode&quot;: &quot;ID1&quot;,
        &quot;street&quot;: [
          &quot;pvr1&quot;
        ]
      }
    ],
   }
  ]
  </code></pre>
  <p>How do I filter records based on 'areaCode' = &quot;ID1&quot;
  I am getting records when I specify the index, but cannot hardcode the index value since the list might have more items. Is there a way to do it dynamically?</p>
  <pre><code>response = table.scan(
       FilterExpression = Attr(&quot;area[0].areaCode&quot;).contains(&quot;ID1&quot;)) 
  </code></pre>