I have the below json content in my sample file:
{
"listingRequest": {
"id": "016a1050-82dc-1262-cc9b-4baf3e0b7123",
"uri": "http://localhost:9090/nifi-api/flowfile-queues/016a104a-82dc-1262-7d78-d84a704abfbf/listing-requests/016a1050-82dc-1262-cc9b-4baf3e0b7123",
"submissionTime": "04/28/2019 19:40:58.593 UTC",
"lastUpdated": "19:40:58 UTC",
"percentCompleted": 0,
"finished": false,
"maxResults": 100,
"state": "Waiting for other queue requests to complete",
"queueSize": {
"byteCount": 480,
"objectCount": 20
},
"sourceRunning": false,
"destinationRunning": false
}
}
I want to retrieve the value of the byte count i.e. byteCount. The result should be 480.
Using other tools like jq
is not allowed to be installed in our ourganization due to restrictions.
How do I do it via sed/grep? I tried grep -Po '"byteCount":.*?[^\\]",'
but did not get any output