I have a string which is dynamic .It represents resp time and ip address
The no of machine can grow and so will the subsequent resp time and ip address.
What I am trying is to split the string first on the basis of '#' and then on the basis of ',' and store the values. The code I have written in ruby is
code => "
fields = event['data'].split('#')
for field in fields
field = field.split(',')
event['respTime1'] = field
event['respTime2'] = field
Can someone explain or tell how to make the fields dynamic so that if I have 100 different servers resp time & IP address, I can use dynamic names for it