I have a structure like
{
f1: 12,
f2 : {
nf1: {........}
}
}
I want to convert it to { f1:12, nf1: {......} }
When I try add_field { "nf1"=> "[f2][nf1]" }, the RHS is not evaluated. If I use %{}, the value is stringified JSON. I also tried adding field nf1 and then copying value-
add_field => { "nf1" => {}}
copy => { "[f2][nf1]" => "nf1" }
But this also does not work. How to do it ?