title: Find index of object in javascript by a value
body: <p>I have a long list of timezones in json like the following. </p>
  
  <pre><code>[
   {"value": "Pacific/Niue", "name": "(GMT-11:00) Niue"},
   {"value": "Pacific/Pago_Pago", "name": "(GMT-11:00) Pago Pago"},
   {"value": "Pacific/Honolulu", "name": "(GMT-10:00) Hawaii Time"},
   {"value": "Pacific/Rarotonga", "name": "(GMT-10:00) Rarotonga"},
   {"value": "Pacific/Tahiti", "name": "(GMT-10:00) Tahiti"},
   {"value": "Pacific/Marquesas", "name": "(GMT-09:30) Marquesas"},
   {"value": "America/Anchorage", "name": "(GMT-09:00) Alaska Time"},
   {"value": "Pacific/Gambier", "name": "(GMT-09:00) Gambier"},
   {"value": "America/Los_Angeles", "name": "(GMT-08:00) Pacific Time"},
   {"value": "America/Tijuana", "name": "(GMT-08:00) Pacific Time -  Tijuana"},
   {"value": "America/Vancouver", "name": "(GMT-08:00) Pacific Time - Vancouver"},
  ]
  </code></pre>
  
  <p>I have user timezone detection set up which returns a timezone string as <code>"America/Los_Angeles"</code></p>
  
  <p>Using Javascript I want to find the where <code>America/Los_Angeles</code> is in the json object so I can use its "name" to prefill a form field. </p>
  
  <p>I am familiar with <code>indexOf()</code> method, but can't work out how to use it in this situation. Is there a simple way to handle this or should I just foreach through the whole list?</p>