How can I flatten an array in my document

Use a ruby filter. I have not tested it but something like this...

ruby {
    code => '
        props = event.get("stringProperties")
        if props
            props.each { |x|
                key = x["key"]
                event.set("stringProperties.#{key}", x["value"])
            }
            event.remove("stringProperties")
        end
    }
}