title: Dictionary equivalent data structure?
body: <p>I'm working in JavaScript and want to keep a list of set km/mph approximations to hand. (I can't convert programmatically, I'm working with an external API that expects certain values, so it really does have to be a dictionary equivalent.)</p>
  
  <p>Currently I'm using an object:</p>
  
  <pre><code>var KM_MPH = { 10: 16, 12: 20, 15: 24 };
  </code></pre>
  
  <p>Going from mph to km is pretty easy:</p>
  
  <pre><code>var km = KM_MPH[10];
  </code></pre>
  
  <p>How do I find mph, given km? Also, is an object the best data structure to use for this sort of thing in JavaScript? I'm more used to Python. </p>