# 어떤 필터를 사용해야 하나요?

**URL:** <https://discuss.elastic.co/t/topic/141287>\
**Category:** 한국어 질문 및 토론\
**Created:** [July 24, 2018, 4:12am UTC](https://discuss.elastic.co/t/topic/141287 "2018-07-24T04:12:56Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![kimjmin](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimjmin/32/15223_2.png) [@kimjmin](https://discuss.elastic.co/u/kimjmin)\
**Post date:** [July 30, 2018, 5:11am UTC](https://discuss.elastic.co/t/topic/141287/2 "2018-07-30T05:11:54Z")

</div>

일단 ruby 필터를 사용하는 방법이 있습니다.

> [@Iteration in Logstash](https://discuss.elastic.co/t/iteration-in-logstash/26123):
>
> I have a string data in Logstash that has been parsed as that looks like "id": "0,3,10" "value": "100,200,300" I would like to match the individual "id" to the corresponding "value" with respect to their order in the string. I want the field to look like "id0": "100" "id3": "200" "id10": "300" As of now, I have used the mutate field to separate the array into its individual values. I used the following code: mutate { add\_field =\> {"id%{[id][0]}" =\> "%{[value][0]}"} add\_field =\> {"id%…

아니면 split 를 사용해서 저 값들을 한 필드의 배열로 우선 넣어두면 그 배열 필드의 형식을 이용해서 한번에 변경은 가능할겁니다. 그 후에 나누는 방법을 사용하면 어떨까요?

어떤 방법이 공수가 적게 드는지 한번 계산 해 보시고 사용 해 보세요.

---

_[View the full topic](https://discuss.elastic.co/t/topic/141287)._
