Recursively filter hashes