title: How to create a SNS Filter Policy that matches nested message attributes?
body: <p>I've created an SNS topic, and I'd like to subscribe to it with a <a href="https://docs.aws.amazon.com/sns/latest/dg/message-filtering.html" rel="noreferrer">filter policy</a> that matches a nested attribute. For example, given a message like this:</p>
  
  <pre><code>{
    "foo": {
      "bar": "baz"
    },
    "quux": "vorp"
  }
  </code></pre>
  
  <p>I'd like to match only messages where the <code>bar</code> attribute of <code>foo</code> is equal to <code>baz</code>.</p>
  
  <p>The documentation I've found so far only mentions matching attributes specified at the top level. I'm interested in a nested attribute. For the purposes of this question, let's assume I don't control the structure of the message.</p>