How to exclude elements if empty or '-'?
instead of:
{
"http_x_forwarded_for": "-",
"http_user_agent": "ApacheBench/2.3",
"body_bytes_sent": "612",
"status": "200",
"remote_user": "-",
"remote_addr": "127.0.0.1",
"time_local": "20/Jul/2015:23:48:14 -0700",
"request": "GET / HTTP/1.0"
}
i would like to have:
{
"http_user_agent": "ApacheBench/2.3",
"body_bytes_sent": "612",
"status": "200",
"remote_addr": "127.0.0.1",
"time_local": "20/Jul/2015:23:48:14 -0700",
"request": "GET / HTTP/1.0"
}
How to exclude elements if empty or '-'?
instead of:
{ "http_x_forwarded_for": "-", "http_user_agent": "ApacheBench/2.3", "body_bytes_sent": "612", "status": "200", "remote_user": "-", "remote_addr": "127.0.0.1", "time_local": "20/Jul/2015:23:48:14 -0700", "request": "GET / HTTP/1.0" }i would like to have:
{ "http_user_agent": "ApacheBench/2.3", "body_bytes_sent": "612", "status": "200", "remote_addr": "127.0.0.1", "time_local": "20/Jul/2015:23:48:14 -0700", "request": "GET / HTTP/1.0" }