Is there a way to use something like array_filter in a template of a block? I get an error with "unexpected $return" when using a callback.
{{ $published = array_filter($records, function($row){ return ($row->fieldValues()['field_8'] == 0); }) ; }}
Actually, I want to use it to filter the database index template. But I guess I will get the same error there, too.