Move content of sub fields as top fields


#1

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


Promote `message` json properties to root level
#2

I would do that using

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

#3

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


(system) #4

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