How to copy (or rename) a complex field into another field?

Hi,
I'd like to keep all the information from rabbitmq_properties that are stored in [@metadata][rabbitmq_properties].

To achieve that, I wanted to copy the complex element into another field (not under @metadata), but haven't succeeded yet.

I tried to use
mutate { add_field => { "headers" => "%{[@metadata][rabbitmq_headers]}" }}
And also
mutate { rename=> { [@metadata][rabbitmq_headers] => headers }}

Neither seems to work.
From the format of add_field, and general information gathered, it seems the expectation is that the resulting added_field would be of type string, so apparently not a valid option for my use case

The rename approach also fails, although I currently haven't found a justification as to why it wouldn't be a valid config.

Yeah, I don't think this is very well supported. You probably need to use a ruby filter.