# Logstash http\_poller で 取得したデータのfilter方法について

**URL:** https://discuss.elastic.co/t/logstash-http-poller-filter/248426
**Category:** 日本語による質問・議論はこちら
**Created:** [September 13, 2020, 2:53am UTC](https://discuss.elastic.co/t/logstash-http-poller-filter/248426 "2020-09-13T02:53:17Z")
**Posts on this page:** 1
**Showing post:** 6

<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:46pm UTC](https://discuss.elastic.co/t/logstash-http-poller-filter/248426/6 "2020-09-19T14:46:20Z")

</div>

できました！  
こちらのが大変ヒントというかそのままでしたいことができました。

> [@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/logstash-http-poller-filter/248426)._
