title: Query Postgres JSONB with traversal of nested key when first parent key is unknown
body: <p>I'm trying to query using JSONB however I have a problem where I don't know what the first key could be.</p>
  
  <p>Ideally I would be able to use a wildcard inside my query.</p>
  
  <p>eg: The following works</p>
  
  <pre><code>WHERE json_data #&gt; '{first_key,second_key}' = '"value-of-second-key"'
  </code></pre>
  
  <p>but I may not know the name of the first_key or want to match any of the nested sub keys.
  Something like.</p>
  
  <pre><code>WHERE json_data #&gt; '{*,second_key}' = '"value-of-second-key"'
  </code></pre>
  
  <p>Would be ideal using a wildcard like '*'</p>
  
  <p>Any advice or approaches to this would be greatly appreciated.</p>