logstash-filter-mutate icon indicating copy to clipboard operation
logstash-filter-mutate copied to clipboard

Fix merge multi field

Open TotalKnob opened this issue 1 year ago • 0 comments

Fix for merging an array of fields into the destination using the merge mutation.

I have included a test which produces the following failure prior to the fix:

LogStash::Filters::Mutate merge multiple fields into string field "{\"foo\":\"bar\",\"spam\":\"ham\",\"list\":\"baz\"}" processes events as specified
     Failure/Error: expect(subject.get("list")).to eq ["baz", "bar", "ham"]
     
       expected: ["baz", "bar", "ham"]
            got: ["baz", "ham"]
     
       (compared using ==)
     # ./spec/filters/mutate_spec.rb:1092:in `block in <main>'

Test passes after the fix.

Fixes #167

TotalKnob avatar May 26 '23 13:05 TotalKnob