title: Find the lastIndexOf() an object with a key in array of objects
body: <p>I'm looking for a way to find the last index of an object in Javascript from a point in an array. For example: </p>
  
  <pre><code>array.lastIndexOf(object.key, start);
  </code></pre>
  
  <p>So far, I haven't found a good solution for this problem. I could splice the array from the 'start' point, reverse it, and then search the sliced array for the key value, but this seems like an inefficient solution to me.</p>
  
  <p>EDIT:</p>
  
  <p>To illustrate the problem a little more, I'm posting the code that I used in the end to solve the problem. Essentially; what I did was I used While to loop through the previous values in the array.</p>
  
  <pre><code>getLastValue = (index) =&gt; {
    const arr = [
      {'d':'01-02-2017','v':'123'},
      {'d':'02-02-2017'},
      {'d':'04-02-2017'},
      {'d':'05-02-2017','v':'456'},
      ...
    ];
  
    let lastValue;
  
    while (arr[index] &amp;&amp; !arr[index].v) {
      index--;
    }
  
    lastValue = arr[index];
  
    return lastValue;
  }
  </code></pre>