I have data coming from Kafka, and the data will look like this:
"x-vcap-request-id":"smitshah",
"x-cf-applicationid":"test",
"x-cf-instanceid":"test2",
"sec-ch-ua":"\"something\";\"willwork\""
It is similiar to JSON but it is not. So i thought of using KV filter,
kv {
source => "header_v1"
value_split => ":"
field_split => ","
}
But now i am getting key this way:
So when i do event.get('\"x-vcap-request-id\"')
i am getting empty result.
How can i resolve this?
The solution was either straightforward or I may have overlooked it, here is my solution:
Added remove_char_key
and escaped \
character, and it solved the problem:
kv {
remove_char_key => "\""
}