I need to fetch below objects from json which I am getting via API. I am trying with jq which is available on ubuntu 16.04.
I am trying to get data in this format device_name C:|
free 18707755008.0
total_size 55832473600.0
Any suggest how should i approach on this ? The goal is get above 3 object in excel.
{
"logical": {
"D:|": {
"device_name": [
"D:\\"
],
"used_percent": [
52.6,
"%"
],
"fstype": "NTFS",
"free": [
10178084864.0,
"B"
],
"total_size": [
21471686656.0,
"B"
],
"used": [
11293601792.0,
"B"
],
"opts": "rw,fixed"
},
"C:|": {
"device_name": [
"C:\\"
],
"used_percent": [
66.5,
"%"
],
"fstype": "NTFS",
"free": [
18707755008.0,
"B"
],
"total_size": [
55832473600.0,
"B"
],
"used": [
37124718592.0,
"B"
],
"opts": "rw,fixed"
}
}
}