title: Check whether a JSON object is a part of another JSON object
body: <p>I try to check if object A is part of object B. As can be seen, all key-value pairs from object A are also contained in object B.
  Object A comes from a YAML file (<em>yaml.safe_load()</em>), object B is the result of an API query (<em>requests.get().json()</em>). Both are of type (<em>with type()</em>): &lt;class 'dict'&gt;</p>
  <p>Example objects:</p>
  <pre><code>Object A
  {
      &quot;title&quot;: &quot;Filebeat&quot;,
      &quot;type&quot;: &quot;org.graylog.plugins.beats.Beats2Input&quot;,
      &quot;global&quot;: true,
      &quot;configuration&quot;: {
          &quot;bind_address&quot;: &quot;0.0.0.0&quot;,
          &quot;port&quot;: 5044,
          &quot;tls_enable&quot;: false,
          &quot;no_beats_prefix&quot;: false
      }
  }
  
  Object B
  {
      &quot;title&quot;: &quot;Filebeat&quot;,
      &quot;global&quot;: true,
      &quot;name&quot;: &quot;Beats&quot;,
      &quot;created_at&quot;: &quot;2020-07-27T12:20:57.041Z&quot;,
      &quot;type&quot;: &quot;org.graylog.plugins.beats.Beats2Input&quot;,
      &quot;creator_user_id&quot;: &quot;admin&quot;,
      &quot;attributes&quot;: {
          &quot;bind_address&quot;: &quot;0.0.0.0&quot;,
          &quot;port&quot;: 5044,
          &quot;tls_enable&quot;: false,
          &quot;no_beats_prefix&quot;: false
      },
      &quot;static_fields&quot;: {},
      &quot;node&quot;: &quot;None&quot;,
  }
  </code></pre>
  <p>I am thinking of:</p>
  <pre><code>if array_a.ispart(array_b):
      ...
  
  </code></pre>
  <p>I've already checked this post (<a href="https://stackoverflow.com/questions/9323749/python-check-if-one-dictionary-is-a-subset-of-another-larger-dictionary">Python: Check if one dictionary is a subset of another larger dictionary</a>), but it doesn't work for me. Maybe because of the nested arrays.</p>