Flatten JSON array (Simple, but I don't know ruby) Please help!


(Ryan Ivis) #1

Here is what my Objects look like.
{
"severity": "",
"organization_name": "",
"source": "",
"organization_id": "",
"server_or_region": "",
"created_at": "",
"title": "",
"id": ""
},
{
"severity": "",
"organization_name": "",
"source": "",
"organization_id": "",
"server_or_region": "",
"created_at": "",
"title": "",
"id": ""
}

It's a nested json array, there could be anywhere from 1 to 100 of these in a single message.

Any tips for a ruby filter to flatten this?


(Magnus B├Ąck) #2

So you have a field with an array of objects in it and you want to split that array so that each object gets its own event, or what's the desired outcome?


(system) #3

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