title: Find last JSON entry with value starting with
body: <p>I need to find the key of last property starting with a string</p>
  
  <p><strong>JSON:</strong></p>
  
  <pre><code>var data = {
      "admin": "peterson",
      "worker": "peter napier",        
      "housekeeper": "peterson",
      "worker": "richard Ben",
      "executive": "richard parker",
      "executive": "peter alp",
      "housekeeper": "richard johny",
      "admin": "richardson"
  };
  </code></pre>
  
  <p>I have to write an algorithm which will return the key corresponding to the last occurence of value starting with a string.</p>
  
  <p>Ex: I need to get <code>admin</code> if I call <code>findKey("richard")</code>
      I need to get <code>executive</code> if I call <code>findKey("peter")</code></p>
  
  <p>I have iterated the object using simple for loop as this</p>
  
  <pre><code>for (var key in yourobject) {
    console.log(key, yourobject[key]);
  }
  </code></pre>
  
  <p>But I like to know the fastest way of iterating this as my scenario has more than 100000 property. </p>