title: How can I access an object of a nested dictionary by the value of an inner key (in JS)?
body: <p>I try to get one object by the value of an inner key of a nested dictionary in JS:</p>
  <p>Example dictionary (in console.log):</p>
  <pre><code>{0: Object { fid: 4, ...}
  1: Object {fid:5, ...}
  ...}
  </code></pre>
  <p>I can return the object keys <code>Object.keys(object)</code> in the console.log():</p>
  <pre><code> [&quot;0&quot;,&quot;1&quot;,...]
  </code></pre>
  <p>The following function then returns value undefined:</p>
  <pre><code>function get_fid(object, value) {
         console.log(object);
         console.log(value);
         return Object.keys(object).find(key =&gt; object[key][&quot;fid&quot;] === value);
      }
  </code></pre>
  <p>I know how to access the dictionary in python but I need to find the object with JS.</p>
  <p>What am I doing wrong?</p>