Filtering a dataset

I want to bring the collections that containd the name “cat” and the collections that contain the name “dog”…