How to apply if condition on the field of json log

I have a log which contains json, i want to apply if condition if log line contains "hai" i need to push data to elasticsearch
@REQ.WS: {"message":"hai","Id":"123"}

Something like this.

  if "hai" in [message] {
    elasticsearch { ... }

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.