# How to remove special character on JSON file in logstash

**URL:** https://discuss.elastic.co/t/how-to-remove-special-character-on-json-file-in-logstash/271462
**Category:** Logstash
**Created:** [April 28, 2021, 4:54am UTC](https://discuss.elastic.co/t/how-to-remove-special-character-on-json-file-in-logstash/271462 "2021-04-28T04:54:36Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![mario\_kazela](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mario_kazela/32/124314_2.png) [@mario\_kazela](https://discuss.elastic.co/u/mario_kazela)
#### Post date: [April 28, 2021, 4:54am UTC](https://discuss.elastic.co/t/how-to-remove-special-character-on-json-file-in-logstash/271462/1 "2021-04-28T04:54:36Z")

</div>

Hi, I'm new with ELK. Just want to ask, how to remove "[" on the logstash?

` [{"uuid": "8153990955613214174559836954673410970", "label": ["Phone", "Laptop", "Pc", "Computer", "Iphone", "Mobile Phone", "Electronics", "Cell Phone"]`

Example, I want to remove the "[" bracket using mutate in logstash, it is possible?

---

<div class="post-metadata">

### Author: ![Wolfram\_Haussig](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wolfram_haussig/32/70528_2.png) [@Wolfram\_Haussig](https://discuss.elastic.co/u/Wolfram_Haussig)
#### Post date: [April 28, 2021, 5:06am UTC](https://discuss.elastic.co/t/how-to-remove-special-character-on-json-file-in-logstash/271462/2 "2021-04-28T05:06:16Z")

</div>

Hello Mario,

You can use the [grok filter](https://www.elastic.co/guide/en/logstash/current/plugins-filters-grok.html) for example.

This could be your pattern: `\[%{GREEDYDATA:json}\]`

It creates a field called json containing everything between the brackets.

Best regards  
Wolfram

---

<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: [May 26, 2021, 5:07am UTC](https://discuss.elastic.co/t/how-to-remove-special-character-on-json-file-in-logstash/271462/3 "2021-05-26T05:07:15Z")

</div>

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