Checking for a pattern in a logstash field name

I would like to check if a dynamic field has a certain pattern in it - for example in my case i get a lot of '.' in the field name which elastic search complains about whilst indexing.

Is there a way i can check if the field name has a certain pattern in it and if it does then either mutate it or drop it. Since these field names are dynamic, i don't know the actual name of the field until it comes by.

The specific case is that i get a json structure with a lot of dynamic values in them. I want to index them all in elasticsearch. But i don't know before hand what these names could be.


Have you seen the Logstash de_dot filter?