![Ruby snippet to iterate through array results in error "Ruby exception occurred: undefined method `[]' for #<LogStash::Event:0x69068bc1>`" - Logstash - Discuss the Elastic Stack Ruby snippet to iterate through array results in error "Ruby exception occurred: undefined method `[]' for #<LogStash::Event:0x69068bc1>`" - Logstash - Discuss the Elastic Stack](https://global.discourse-cdn.com/elastic/original/3X/2/4/24c2c66af97db2fe46ad2462f6ea9a7662651cd2.png)
Ruby snippet to iterate through array results in error "Ruby exception occurred: undefined method `[]' for #<LogStash::Event:0x69068bc1>`" - Logstash - Discuss the Elastic Stack
![What is the difference between numeric and associative array in loop with example? - DevOpsSchool.com What is the difference between numeric and associative array in loop with example? - DevOpsSchool.com](https://www.devopsschool.com/blog/wp-content/uploads/2020/01/loop-ex.png)
What is the difference between numeric and associative array in loop with example? - DevOpsSchool.com
![Actual code from the first result when googling "How to get the first word in a string python". I was expecting str[:str.index('_')] : r/ProgrammerHumor Actual code from the first result when googling "How to get the first word in a string python". I was expecting str[:str.index('_')] : r/ProgrammerHumor](https://preview.redd.it/actual-code-from-the-first-result-when-googling-how-to-get-v0-iflj8fsp0g491.png?auto=webp&s=4f5c585b759abc8a5cfc54ef3fb9fde7cf6e582a)