How to convert a field string to list in logstash

HI,
How to convert string field to list in logstash.

This is my field data.
"http_urls" => "['http://11', 'http://22']"

How should I write in my logstash's config?
How modify it on my code?
mutate {
convert => [
"http_urls", "???"
]
}

Thanks.

You're asking about how to convert a string into a list, but the example you give is a list. Please clarify what you're trying to do and why you want to do this.

I'm using logstash from to filebeat and output to elasticsearch.
I want to convert the field http_urls's type from string to list through the logstash's filter.

Then perhaps you're looking for the mutate filter's split option.

1 Like

Oh! It's succeed. Thank you very much !

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