You can apply tags to the events or use the source field to identify which logs came from which files.
Example using tags:
filebeat.prospectors:
- paths:
  - /path/to/log/type/A/*.log
  tags: ["log_type_a"]
- paths:
  - /path/to/log/type/B/*.json
  tags: ["log_type_b", json]
Then over in your Logstash config you can use a condition to apply whatever processing you would like.
filters {
  if "log_type_b" in [tags] {
     // do something fun like grok
  } // else if ...
}