Split array fields in logstash

You are correct. It doesnt work for above ruby code.
My logstash config file ran with by commenting few lines.

I took reference from below code written by you for some other post

filter {
ruby {
code => '
ids = event["id"].split(",")
values = event["value"].split(",")
if ids.length == values.length
ids.each_index { |i| event["id#{ids[i]}"] = values[i] }
end
'
}
}

Could you please tell me what is wrong in the ruby code I wrote or help me with ruby code to solve the prob