title: Is this a right way to search names into JavaScript arrays?
body: <p>I'm trying to implement a dynamic list view by React JS without using any ready to use components. I will need a simple search to find users by their names and I should manage this issue ...</p>
  
  <p>For example I thought and wrote this code :</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>var students = [
      {
          name: 'David',
          age: 12
      },
      {
          name: 'Daniel',
          age: 13
      },
      {
          name: 'Alex',
          age: 10
      }
  ];
  
  var key = 'Da';
  
  function search(item) {
      return item.name.substring(0, key.length) == key;
  }
  
  var result = students.filter(search);</code></pre>
  </div>
  </div>
  </p>
  
  <p>In this case I should search into array and I've not any API to handle like query and manage search.</p>
  
  <p>Performance and best practices is very important for me ...</p>
  
  <p>So, is using the filter and substring optimized to implement custom simple search ? if even I have a big array with more than 1000 indexes !</p>
  
  <p>Thank you</p>