我试图将价值从一个json档案中删除。 然而,我的档案具有无财产名称的价值。
The json file, name items. json, looks:
{
"AQ_01_Availability": {
"class": "org.openhab.core.items.ManagedItemProvider$PersistedItem",
"value": {
"groupNames": [
"gAirQuality_01"
],
"itemType": "Switch",
"tags": [],
"label": "Availability"
}
},
"AQ_01_CO2": {
"class": "org.openhab.core.items.ManagedItemProvider$PersistedItem",
"value": {
"groupNames": [
"gAirQuality_01"
],
"itemType": "Number",
"tags": [],
"label": "CO2"
}
},
"AQ_01_Formaldehyde": {
"class": "org.openhab.core.items.ManagedItemProvider$PersistedItem",
"value": {
"groupNames": [
"gAirQuality_01"
],
"itemType": "Number",
"tags": [],
"label": "Formaldehyde"
}
},
"AQ_01_Humidity": {
"class": "org.openhab.core.items.ManagedItemProvider$PersistedItem",
"value": {
"groupNames": [
"gAirQuality_01"
],
"itemType": "Number",
"tags": [],
"label": "Humidity",
"category": "humidity"
}
}
}
页: 1 每一物体的名称将退回<代码>null。
我期望的结果是:
AQ_01_Availability
AQ_01_CO2
AQ_01_Formaldehyde
AQ_01_Humidity
I have never used jq nor am I too familiar with json. My assumption was a well-structured file, thinking that each object starts with, say, item_name
.