Convert values in kv-pairs (using ruby filter)

You have to use event.get/set now. And in case you ever have non-numerics in the set...

            kv = event.get('kvpairs')
            kv.to_hash.keys.each { |k|
                if kv[k].to_i.to_s == kv[k]
                    kv[k] = kv[k].to_i
                end
                if kv[k].to_f.to_s == kv[k]
                    kv[k] = kv[k].to_f
                end
            }
            event.set('kvpairs', kv)
        "