title: Using http requests vs. manually searching array
body: <p><strong>Scenario:</strong></p>
  
  <p>I'm building a web app using angularjs. I have an api that connects to my database.</p>
  
  <p>For example, if I have a page that uses data from my database. Which is the best way to go about doing this?</p>
  
  <p><strong>Way One</strong></p>
  
  <p>GET request for all data</p>
  
  <pre><code>var array = http.get( find all );
  </code></pre>
  
  <p>When I need specific queries</p>
  
  <pre><code>var another-array = http.get( find by query );
  </code></pre>
  
  <p><strong>Way Two</strong></p>
  
  <p>GET request for all data</p>
  
  <pre><code>var array = http.get( find all );
  </code></pre>
  
  <p>When I need specific queries</p>
  
  <pre><code>for(loop through array to find data);
  </code></pre>
  
  <p>Somewhat related question, also the reason I'm tied between the two options, but what is the general rule of thumb with how many http.get() I should be making for a web page before it slows operations down too much.</p>