Using logstash I can mutate the string and end up with an array by using
mutate {
add_field => {A => "%{A1}")
add_field => {A => "%{A2}")
add_field => {A => "%{A3}")
add_field => {A => "%{A4}")
}
I would like to eliminate the duplicates in the array so that I end up with
{
"A": ["123", "225", "668"]
}
I have tried using kv {} with allow_duplicate_values=false
but that would only work if my input data was of the format
{
"A":"123",
"A":"225",
"A":"668",
"A":"225"
}
Looking at this post
it would appear to be some variation on
if [A2] in [A] {
if %{A2} in [A] {
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.