Move content of sub fields as top fields

Hi,

Let's say I have the following example:

"entry": {
      "id": "1234567",
      "name": "Aryam",
      "age": 28,
      "city": "Yerevan"
}

Is there a plugin that can move the subfields from entry (id, name, age and city) to a top level? I know you can rename them, but it will be a very complicated task if entry contains even more fields inside.

Thanks

I would do that using

    ruby {
        code => '
            event.get("entry").each { |k, v|
                event.set(k, v)
            }
        '
    }
1 Like

Oh, definitely this is the best option. Thank you!

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.