# How to remove\_field for json data by http\_poller at all once

**URL:** https://discuss.elastic.co/t/how-to-remove-field-for-json-data-by-http-poller-at-all-once/248545
**Category:** Logstash
**Created:** [September 14, 2020, 2:47pm UTC](https://discuss.elastic.co/t/how-to-remove-field-for-json-data-by-http-poller-at-all-once/248545 "2020-09-14T14:47:09Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![unisuke](https://avatars.discourse-cdn.com/v4/letter/u/9d8465/32.png) [@unisuke](https://discuss.elastic.co/u/unisuke)
#### Post date: [September 19, 2020, 2:47pm UTC](https://discuss.elastic.co/t/how-to-remove-field-for-json-data-by-http-poller-at-all-once/248545/2 "2020-09-19T14:47:38Z")

</div>

I did.  
It's very helpful.

> [@Remove Subfield using ruby](https://discuss.elastic.co/t/remove-subfield-using-ruby/225055/4):
>
> Hi badger thank you, but i tweak a little ruby { code =\> ' event.get("attachments").each\_with\_index { |b,index| event.remove("[attachments][#{index}][documentCharacteristic]") } ' }

```auto
filter {
        ruby {
                code => '
                        event.get("content").each_with_index { |b,index|
                                event.remove("[content][#{index}][AList]")
                        }
                '
        }
}

```

---

_[View the full topic](https://discuss.elastic.co/t/how-to-remove-field-for-json-data-by-http-poller-at-all-once/248545)._
