Preciso converter uma string JSON usando jq, conforme mostrado abaixo, em um formato de tabela para exibir a saída no terminal.
{
"results": [
[
{
"field": "@timestamp",
"value": "2023-07-03 08:28:00.000"
},
{
"field": "CpuReserved",
"value": "8192.0"
},
{
"field": "CpuUtilized",
"value": "4056.412942708333"
},
{
"field": "MemoryReserved",
"value": "61440"
},
{
"field": "MemoryUtilized",
"value": "4311"
},
{
"field": "@ptr",
"value": "CpABClUKUTE0NjcxNzAzNzI0NzovYXdzL2Vjcy9jb250YWluZXJpbnNpZ2h0cy9pcmwtaW5mcmEtc2hhcmVkLWplbmtpbnMtbWFpbi9wZXJmb3JtYW5jZRABEjUaGAIGSaxosQAAAAAd+TFeAAZKKHIwAAABEiABKIDF9taRMTDA7v3WkTE4BkC9NEjNPFCBIRgAEAAYAQ=="
}
],
[
{
"field": "@timestamp",
"value": "2023-07-03 08:28:00.000"
},
{
"field": "CpuReserved",
"value": "8192.0"
},
{
"field": "CpuUtilized",
"value": "4056.412942708333"
},
{
"field": "MemoryReserved",
"value": "61440"
},
{
"field": "MemoryUtilized",
"value": "4311"
},
{
"field": "@ptr",
"value": "CpABClUKUTE0NjcxNzAzNzI0NzovYXdzL2Vjcy9jb250YWluZXJpbnNpZ2h0cy9pcmwtaW5mcmEtc2hhcmVkLWplbmtpbnMtbWFpbi9wZXJmb3JtYW5jZRABEjUaGAIGSaxosQAAAAAd+TFeAAZKKHIwAAABEiABKIDF9taRMTDA7v3WkTE4BkC9NEjNPFCBIRgAEAEYAQ=="
}
]
]
}
O que eu quero exibir no terminal é o seguinte:
@timestamp CpuReserved CpuUtilized MemoryReserved MemoryUtilized
==========================================================================================
2023-07-03 08:16:00.000 8192.0 410.5300065104166 61440 1417
2023-07-03 08:15:00.000 8192.0 702.310791015625 61440 792
Alguém pode me guiar na direção certa?