# Remove from json

**URL:** <https://discuss.elastic.co/t/remove-from-json/286047>\
**Category:** Logstash\
**Created:** [October 6, 2021, 3:14pm UTC](https://discuss.elastic.co/t/remove-from-json/286047 "2021-10-06T15:14:04Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ANISH\_VERMA](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anish_verma/32/95527_2.png) [@ANISH\_VERMA](https://discuss.elastic.co/u/ANISH_VERMA)\
**Post date:** [October 6, 2021, 3:14pm UTC](https://discuss.elastic.co/t/remove-from-json/286047/1 "2021-10-06T15:14:04Z")

</div>

Hi I am using logstash so when I am doing the multi-line thing I am getting \n \t \r like character in json is there away to remove these in Json message without compromising with the message layout . And even if it is how to remove that would be helpful. Thanks

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [October 6, 2021, 3:23pm UTC](https://discuss.elastic.co/t/remove-from-json/286047/2 "2021-10-06T15:23:27Z")

</div>

You could use mutate

```
mutate { gsub => ["message", "[\n\r\t]", "" ] }
```

---

<div class="post-metadata">

**Author:** ![ANISH\_VERMA](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anish_verma/32/95527_2.png) [@ANISH\_VERMA](https://discuss.elastic.co/u/ANISH_VERMA)\
**Post date:** [October 6, 2021, 3:44pm UTC](https://discuss.elastic.co/t/remove-from-json/286047/3 "2021-10-06T15:44:37Z")

</div>

Does it hinder the format of logs

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [October 6, 2021, 4:01pm UTC](https://discuss.elastic.co/t/remove-from-json/286047/4 "2021-10-06T16:01:53Z")

</div>

That depends on the exact format of the logs.

---

<div class="post-metadata">

**Author:** ![ANISH\_VERMA](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anish_verma/32/95527_2.png) [@ANISH\_VERMA](https://discuss.elastic.co/u/ANISH_VERMA)\
**Post date:** [October 6, 2021, 4:04pm UTC](https://discuss.elastic.co/t/remove-from-json/286047/5 "2021-10-06T16:04:25Z")

</div>

Hey there I am using logstash to send logs to new relic for that is there a way to set logstash so that we can it can automatically process the logs in. Injecting logs to new relic

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 3, 2021, 4:04pm UTC](https://discuss.elastic.co/t/remove-from-json/286047/6 "2021-11-03T16:04:44Z")

</div>

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