Ruby code to split array message and get the index and value in logstash

Please don't start multiple threads asking the same thing.