Modify the messages in the event in logstash

Consider the message captured by Logstash (for an event) happen to look like this.

Sending 1 NEWLINE Sending 2 NEWLINE Sending 4 NEWLINE Sending 5 NEWLINE Sending 6 NEWLINE Sending 7 NEWLINE Sending 8 NEWLINE Sending 9

Now is there a way to modify the message i.e replace the NEWLINE(above) with \n (a newline character) before sending it over to ElasticSearch

I tried using filter split

 filter {
    split {
      terminator => "NEWLINE"
    }
 }

But unfortunately it did not work. Although custom logs (added by me in the plugins) showed that the terminator was found and replaced but nothing appeared on Kibana Dashboard.

Thanks,