title: coffeescript: loop through objects in array
body: <p>I am fairly new to coffeescript and am trying to loop through objects in an array but can't get it working correctly. </p>
  
  <pre><code>var val = [
      {id: 1, Text: "first" },
      {id: 2, Text: "Second" },
      {id: 3, Text: "Third" }
  ]
  var idObj = 1
  
  for idObj in val 
      console.log('this is' + idObj)
  </code></pre>
  
  <p>From the code above, I am trying to find the object where <code>id</code> is 1, but it returns true for all of them.
  I have seen examples how to loop through arrays but not sure how it works for objects within arrays</p>
  
  <p>Thanks</p>