Hi everybody,
I want to understand how to parse data from .json file. For example I have the following .json file content taken from netflow web application:
JQuery returns the below output:
This actually shows the traffic between EndpointA and EndpointB by protocol/port
My question is how to parse the data to get graphed data like:
EndpointA:10.198.134.6 <->EndpointB:10.149.48.113 - value in bytes 2934347410
Thanks in advance for any reply.
I want to understand how to parse data from .json file. For example I have the following .json file content taken from netflow web application:
Code:
[{"bytes":2934347410,"avgBitsPerSecond":6520772,"flows":11,"packets":2771018,"avgFlowsPerSecond":0.004,"endpointA":{"ip":"10.198.134.6","port":60096},"endpointB":{"ip":"10.149.48.113","port":34750},"application":{"id":542,"name":"UDP","classification":"Networking","category":"General","risk":1}}]
Code:
# jq . 1.json
[
{
"application": {
"risk": 1,
"category": "General",
"classification": "Networking",
"name": "UDP",
"id": 542
},
"endpointB": {
"port": 34750,
"ip": "10.149.48.113"
},
"endpointA": {
"port": 60096,
"ip": "10.198.134.6"
},
"avgFlowsPerSecond": 0.004,
"packets": 2771018,
"flows": 11,
"avgBitsPerSecond": 6520772,
"bytes": 2934347410
}
]
My question is how to parse the data to get graphed data like:
EndpointA:10.198.134.6 <->EndpointB:10.149.48.113 - value in bytes 2934347410
Thanks in advance for any reply.
Comment