How to use if condition in logstash

I want to use if statement in my logstasg config file to get some particular data from a file.
but i don't know how exactly we use if statements in its config file.
any one can please share me the syntax here.


The documentation has examples.