title: how to check for properties in an array
body: <p>I am making a service call where I get back some data. For example:</p>
  
  <pre><code>var response = [
    {id: 1, name: 'text1'},
    {id: 2, name: 'text2'}
  ];
  </code></pre>
  
  <p>This array represents the most possible data I could get back. In other instances I may get back an empty array, an array with only one of those objects(either or of the objects inside the array). 
  I'd like to somehow loop through my array and check the id of each on=bject to set a flag for the front end to display other data. How do I properly do checks for the id's in the array for the scenarios I mentioned above?</p>