# Remove double quotes from the field in Logstash message

**URL:** <https://discuss.elastic.co/t/remove-double-quotes-from-the-field-in-logstash-message/217745>\
**Category:** Logstash\
**Created:** [February 4, 2020, 8:51am UTC](https://discuss.elastic.co/t/remove-double-quotes-from-the-field-in-logstash-message/217745 "2020-02-04T08:51:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kamesh\_M](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kamesh_m/32/57639_2.png) [@Kamesh\_M](https://discuss.elastic.co/u/Kamesh_M)\
**Post date:** [February 4, 2020, 8:51am UTC](https://discuss.elastic.co/t/remove-double-quotes-from-the-field-in-logstash-message/217745/1 "2020-02-04T08:51:09Z")

</div>

raw=\>"{ "device" : "TIR1-SF2.abc.om - Gignet1/2/4 · **"f1-sf2:[7]"** test abc " }"

How to remove doublequotes for "f1-sf2:[7]" for the field "device".

Im getting error while parsing this as json  
:exception=\>#\<LogStash::Json::ParserError: Unexpected character ('f' (code 102)): was expecting comma to separate OBJECT entries

at [Source: [B@3228c27a; line: 1, column: 136]\>, :level=\>:warn}

---

<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:** [February 4, 2020, 5:03pm UTC](https://discuss.elastic.co/t/remove-double-quotes-from-the-field-in-logstash-message/217745/2 "2020-02-04T17:03:46Z")

</div>

> [@Kamesh\_M](#):
>
> Im getting error while parsing this as json

That is to be expected, since it is not valid JSON. You may be able to fix it using mutate+gsub. We cannot give you a regexp to use from a single example.

---

<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:** [March 3, 2020, 5:03pm UTC](https://discuss.elastic.co/t/remove-double-quotes-from-the-field-in-logstash-message/217745/3 "2020-03-03T17:03:56Z")

</div>

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