Using Ruby to rename and flatten dynamic json input

I have a variable in Logstash that holds some nested JSON.
I do not know the structure or name of the keys (they are dynamic). I need to flatten this JSON into a single level and append a "nested_" to all the keys that were nested. I am guessing I have to do this with Ruby? I have been trying different things and I haven't been able to get something working. I'd appreciate any help or hints.


There is an example of doing that here.

1 Like

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