Logstash conditional output

How to create multiple indexs with multiple input in logstash - #4 by Badger is a great example of how to do this.