Logstash doesn't delete nested fileds from json field

Hello there. I have an issue.
In my logs there is raw string that contains json.
I apply the json Logstash filter to it to get json-structured field.

    json {
      source => "response_body"
      target => "response_fields"
      remove_field => [ "response_body" ]
    }

The output field contains multiple similar nested fields that i don't need.
I want to delete them but Logstash doesn't do it and I can't get why.
I tried to do it inside json plugin like

json {
      source => "response_body"
      target => "response_fields"
      remove_field => [ "response_body","[response_fields][contents][agg_content_gid]" ]
    }

Or by mutate plugin after json, but with no result. Fields still remains in index?
What am I doing wrong?

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