Use index and get value from an array in ruby logstash

Ok. Got the solution.

event['RCODE'] = event['data'].at(event['IntegerValue'])