I've got log lines in the following format and want to extract fields:
{
"message" => "...",
"@version" => "1",
"@timestamp" => "2014-07-07T08:49:28.543Z",
"host" => "abc",
"field1" => "content1",
"field2" => "content2",
"field3" => "content3"
}
I neither know the field names, nor the number of fields.
i only want to get the "message"、"@version"、"@timestamp"、"host"、 "field1" and the content of these fields that i want , the output looks like as follows,
"message" => "...",
"@version" => "1",
"@timestamp" => "2014-07-07T08:49:28.543Z",
"host" => "abc",
"field1" => "content1"
Kindly help me to get required output.