Append field content in another field

Then you could use the following code to get all projects that have a matching tag in either field:

  // add the filter
  if(!empty(param('filter'))) {
    $filter = param('filter');
    $projects = $projects->filter(function($project) use($filter) {
      // check if one of the fields contains the tag
      if(in_array($filter, $project->filter()->split(','))) return true;
      if(in_array($filter, $project->job()->split(','))) return true;
      
      // neither field contains the tag
      return false;
    });
  } else {
    $projects = new Pages(array($projects_portfolio_featured, $projects_side_featured));
  }
  return compact('projects', 'filters', 'filter');