Logstash - How to Dynamic Parse Log's value

    ruby {
        code => '
            event.to_hash.each { |k, v|
                if k =~ /\|/ and v.to_s =~ /\|/
                    k = k.sub(/.*\./, "").sub(/}$/, "").split(/\|/)
                    v = v.split(/\|/)

                    k.each_index { |x|
                        event.set(k[x], v[x])
                    }
                end
            }
        '
    }

works for that example, but has no error handling and is fairly fragile with respect to the data format.