How to loop through array in Logstash?

do we need to specify the index variable here ? like event.set(x["rawResponse"],value) like ?

when I use this it is replacing the globally defined rawResponse value not inside the array