I would like to get first objects (don't know if it's the right name) of my json file that is huge (more than 120k lines), so I can't parse it manually.
Format is like this :
"datanode": [
{
"isWhitelisted": true,
"metricname": "write_time",
"seriesStartTime": 1542037566944,
"supportsAggregation": true
},
{
"isWhitelisted": true,
"metricname": "dfs.datanode.CacheReportsNumOps",
"seriesStartTime": 1542037501137,
"supportsAggregation": true,
"type": "COUNTER"
},
{
"isWhitelisted": true,
"metricname": "FSDatasetState.org.apache.hadoop.hdfs.server.datanode.fsdataset.impl.FsDatasetImpl.EstimatedCapacityLostTotal",
"seriesStartTime": 1542037495521,
"supportsAggregation": true,
"type": "GAUGE"
},
],
"toto": [
....
And what I need is to extract this : datanode, toto, etc. Only the name.
Can you help me please ?
I tried using jq without success.