Working with filebeat

If I add a field in my beat, say, type_of_field=1,
And I want to use this field to determine, which of the config files of logstash should it go to.
Suppose I have a config file in logstash for parsing "a" types of logs and another for parsing "b" types of logs., how do I send logs to the appropriate file?