How to use if condition in logstash

Hi,
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.

Thanks.

The documentation has examples.