public function filter_filters(array $cfg, $field, $operator = null): ?array
  {
    if ( isset($cfg['filters']) ){
      $f = function($cond, &$res = []) use (&$f, $field, $operator){
        foreach ( $cond as $c ){
          if ( isset($c['conditions']) ){
            $f($c['conditions'], $res);
          }
          else if ( ($c['field'] === $field) && (!$operator || ($operator === $c['operator'])) ){
            $res[] = $c;
          }
        }
        return $res;
      };
      return isset($cfg['filters']['conditions']) ? $f($cfg['filters']['conditions']) : [];
    }
    return null;
  }