I am trying data that looks like this
First I need to remove every unwanted field, then I want to change categories.colors to only blue.t.type.
I can use a kv filter for to remove unwanted fileds, but I am unable to find an easy way to remove
code => "
keys = event.to_hash.keys
if ( key =~ /m./ )
if key.start_with? '[categories][colors]' #I don't know what should go in the event.set, how do I can a field name matching a pattern and doing a substring to get everything after the ''.t.'' event.set('key.substring something', event.remove(key))
I amd having a hard time doing a start, ruby doesnt seem to like [field][field] and I can't escape de dots either with a backslash..
I am starting to wonder if i am on the right path or is there an easier way?