title: What is the best way to find the first occurrence of an item in a collection and update it
body: <p>I have a collection in Javascript/Typescript</p>
  
  <pre><code> [
    {"order":1,"step":"abc:","status":true},
  {"order":2,"step":"xyz","status":true},
  {"order":3,"step":"dec","status":false},
  {"order":4,"step":"pqr","status":false},
  {"order":5,"step":"tuv","status":false}
  ....
  ];
  </code></pre>
  
  <p>I need to write a function that every time its called it identifies the first occurrence of a false (Order:3 in the above example) and updates it to true. If the above method is called again now the next element (order:4 ) would have been updated. The steps that are false will always be below steps that are completed i.e true.</p>
  
  <p>What's the best way (simplest, less code and elegant) to write this function? I can manually loop through using for each of the items in the collection, check for the first occurrence of false and then update it. </p>