Hi
I am using zip functionality to form arrays with values from same index. The following seems to work in irb.
irb(main):001:0> users = ["john", "david", "peter"]
=> ["john", "david", "peter"]
irb(main):002:0> students = ["Mike", "Tim", "Monique"]
=> ["Mike", "Tim", "Monique"]
irb(main):003:0> list = users.zip(students)
=> [["john", "Mike"], ["david", "Tim"], ["peter", "Monique"]]
If i do the same in logstash filter section, like below-
ruby {
code => " list = version.zip( vendor ) "
}
I get the following error-
ERROR logstash.filters.ruby - Ruby exception occurred: undefined local variable or method `version' for #LogStash::Filters::Ruby:0x25278b7
Also, whether the zip method is the best way to combine the arrays for this scenario?