Hi @Raj_Sekhar,
You need to add this in your logstash configuration file which is in /conf.d/ directory.
There are three section in conf file Input, Filter and Output. You need to add this in filter section.
Please find document link for filter ruby plugin.
Also, i found a discussion for similar problem. You can look into this and can get more idea about filter plugin.
File in the command is /tmp/test.json.
Please do let me know if you need more help in this regard.
Regards,
Harsh Bajaj