I get this from an ActiveRecord call:

```
#<ActiveRecord::Associations::CollectionProxy [
  #<CarService id: nil, car_id: nil, car_service: 1, 
               created_at: nil, updated_at: nil, car_type: 0>, 
  #<CarService id: nil, car_id: nil, car_service: 11,
               created_at: nil, updated_at: nil, car_type: 1>]>

```

Once I get this, I need to filter only records where `car_type = "0"`. How to do that without doing another database call (`WHERE car_type = "0"`)?

Thank you in advance.

**EDIT:**

this:

```
car.car_services.select{|key, hash| hash['car_type'] == "1" }

```

does not work.