title: Is there a way to access the key of an object in accordance to its value?
body: <p>I want to access the key of an object in accordance to the value that it was outputted so for example:</p>
  <p>I have this object</p>
  <pre><code>var characters = {
      a: &quot;0&quot;,
      b: &quot;1&quot;,
      c: &quot;2&quot;,
      d: &quot;3&quot;,
      e: &quot;4&quot;,
      f: &quot;5&quot;,
      g: &quot;6&quot;,
      h: &quot;7&quot;,
      i: &quot;8&quot;,
      j: &quot;9&quot;
  </code></pre>
  <p>And I have this sum:</p>
  <pre><code>var result = 2+2
  </code></pre>
  <p>The result would be 4 so I would like to output the key e in my console. I've tried to use the method <code>Object.keys()</code> but this just returns the key value and it doesn't return it in accordance to the value.</p>