title: Navigate dict based on its structure
body: <p>I have a python code that interacts with multiple APIs. All of the APIs return some json but each has different structure. Let's say I'm looking for people's names in all these jsons:</p>
  <pre><code>json_a = {
      &quot;people&quot;: [
          {&quot;name&quot;: &quot;John&quot;},
          {&quot;name&quot;: &quot;Peter&quot;}
      ]
  }
  
  json_b = {
      &quot;humans&quot;: {
          &quot;names&quot;: [&quot;Adam&quot;, &quot;Martin&quot;]
      }
  }
  </code></pre>
  <p>As you can see above the dictionaries from jsons have arbitrary structures. I'd like to define something that will serve as a &quot;blueprint&quot; for navigating each json, something like this:</p>
  <pre><code>all_jsons = {
      &quot;json_a&quot;: {
          &quot;url&quot;: &quot;http://endpoint&quot;,
          &quot;json_structure&quot;: &quot;people -&gt; list -&gt; name&quot;
      },
      &quot;json_b&quot;: {
          &quot;url&quot;: &quot;http://someotherendpoint&quot;,
          &quot;json_structure&quot;: &quot;humans -&gt; names -&gt; list&quot;
      }
  }
  </code></pre>
  <p>So that if I'm working with <code>json_a</code> I'll just look into <code>all_jsons[&quot;json_a&quot;][&quot;json_structure&quot;]</code> and I have an information on how to navigate this exact json. What would be the best way to achieve this?</p>