Logstash Ruby How to get fields of json array

Hi I have an array

"testItem":["test1":"N", "test2":"", "test3":"xyz", "items":{"itemId":"123"},"test4","null"]

In here I want to extract the itemId from Json input through logstash how can i do it. I am new to logstash.

if [testItems][items][itemId] contains
then copy => {"itemId"=>%[testItems][items][itemId]}

thanks for help

This is not valid JSON, and it is unclear to me what structure you are trying to express. Can you provide more detail about what you are attempting to accomplish?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.