title: How would I use a known value in an array to find another value in the same array?
body: <p>I am working with a strange data struct that looks something like this:</p>
  <pre class="lang-js prettyprint-override"><code>const time = {
        60: [
          { acc: 98.97, language: 'english', punctuation: false, wpm: 96, raw: '46' },
          { acc: 92.63, language: 'english_10k', punctuation: false, wpm: 59.19, raw: 60.99 }
        ]
  };
  </code></pre>
  <p>I already have the value of wpm (e.g. 96) but need to find the value of raw from the same array 96 came from. I have given it an attempt as follows:</p>
  <pre class="lang-js prettyprint-override"><code>function findTimeRaw() {
        let timeVal = 96
        let {raw} = time[timeVal].find(({wpm})=&gt;wpm===timeVal);
        return raw
  }
  </code></pre>
  <p>This should in theory return &quot;46&quot; but instead returns undefined.</p>
  <p>Can anyone explain where I have gone wrong?</p>