How can you iterate through an array of objects and return the entire object if a certain attribute is correct?
I have the following in my rails app
arr
array_of_objects.select { |favor| favor.completed == false }
Will return all the objects that's completed is false.
You can also use find_all instead of select.
find_all
select