# Weird mutate gsub behaviour double quotes

**URL:** <https://discuss.elastic.co/t/weird-mutate-gsub-behaviour-double-quotes/37307>\
**Category:** Logstash\
**Created:** [December 16, 2015, 6:25am UTC](https://discuss.elastic.co/t/weird-mutate-gsub-behaviour-double-quotes/37307 "2015-12-16T06:25:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Raggyman](https://avatars.discourse-cdn.com/v4/letter/r/d07c76/32.png) [@Raggyman](https://discuss.elastic.co/u/Raggyman)\
**Post date:** [December 16, 2015, 6:25am UTC](https://discuss.elastic.co/t/weird-mutate-gsub-behaviour-double-quotes/37307/1 "2015-12-16T06:25:18Z")

</div>

Have found myself in the position where I have malformed json, that won't be changed for a while.

Basically I have "realip": ""111.111.111.111" where I have an incidental extra double quote at the front.

This is json that is being send to logstash using filebeat, but for the life of me I can't get it to replace the double quotes with a single.

I have tried quiet a few things, but can't get it to play nice, which just removes one of the double quotes.

ATM I have  
gsub =\> ["message","realip": "", "realip":"]

---

<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:** [July 6, 2017, 5:18am UTC](https://discuss.elastic.co/t/weird-mutate-gsub-behaviour-double-quotes/37307/2 "2017-07-06T05:18:15Z")

</div>


