# Ruby snippet to iterate through array results in error "Ruby exception occurred: undefined method \`\[\]' for #\<LogStash::Event:0x69068bc1\>\`"

**URL:** <https://discuss.elastic.co/t/ruby-snippet-to-iterate-through-array-results-in-error-ruby-exception-occurred-undefined-method-for-logstash-0x69068bc1/222166>\
**Category:** Logstash\
**Created:** [March 4, 2020, 10:07pm UTC](https://discuss.elastic.co/t/ruby-snippet-to-iterate-through-array-results-in-error-ruby-exception-occurred-undefined-method-for-logstash-0x69068bc1/222166 "2020-03-04T22:07:24Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [March 4, 2020, 10:14pm UTC](https://discuss.elastic.co/t/ruby-snippet-to-iterate-through-array-results-in-error-ruby-exception-occurred-undefined-method-for-logstash-0x69068bc1/222166/2 "2020-03-04T22:14:30Z")

</div>

1. Yes

2. No. See [here](https://discuss.elastic.co/t/logstash-redis-filter-goes-wrong/222151/2).

---

_[View the full topic](https://discuss.elastic.co/t/ruby-snippet-to-iterate-through-array-results-in-error-ruby-exception-occurred-undefined-method-for-logstash-0x69068bc1/222166)._
