Split string into array and then into key value pairs

I would do that using ruby.

    ruby {
        code => '
            x = event.get("SomeField")
            if x
                a = []
                x.split(";").each { |y|
                    z = y.split(":")
                    a << { "key" => z[0], "value" => z[1] }
                }
            end
            event.set("SomeField", a)
        '
    }