Hello,
I have logs that look like this
{
    "attachments" : [ 
        {
            "field1" : "rkredux",
            "inner_value" : [
                "check"
            ]
        },
        {
            "field1" : "kkrist",
            "inner_value" : [
                "uncheck"
            ]
        },
        {
            "field1" : "uuiui2",
            "inner_value" : [
                "mblake"
            ]
        }
    ]
}
and my LS pipeline with a ruby filter looks like this
input {
  http {
    port => 5011
  }
  
}
filter {
  json{
    source => "message"
  }
  ruby {
    code => 
    "
      index = -1
      for inner in event.get('[attachments]') do
        index += 1
          event.remove('[attachments][index][inner_value]')
      end
    "
  }
}
output {
  stdout {
  }
}
But this pipeline does not remove the inner_value array from the fields inside and does not throw any ruby exception either. I expect my output logs to look like this
{
        "attachments" : [ 
            {
                "field1" : "rkredux"
            },
            {
                "field1" : "kkrist"
               
            },
            {
                "field1" : "uuiui2"
            
            }
        ]
    }