Hi, I need help with processing JSON file. My input looks like this (I need to keep it intact):
input {
s3 {
bucket => "${S3_BUCKET}"
access_key_id => "${S3_ACCESS_KEY}"
secret_access_key => "${S3_SECRET_KEY}"
exclude_pattern => "^.*(?<!txt|json)$"
}
}
JSON I'm trying to parse looks like this:
{
"unknown_url":[
"ad",
"rsl",
"vbf"
]
}
I've tried JSON filter, custom ruby code, but the main problem is that key is unknown. Only certain thing is structure. So, I need to extract first (only) key of this JSON to a new field, and its value (array) to another field:
url : "unknown_url"
parameters : [ "ad", "rsl", "vbf"]