我有一个这样的输入-
[
{
"time": "2014-10-31T01:59:59.000+10:00",
"value": {
"nil": null
},
"metadata": {
"TVPMeasurementMetadata": {
"qualifier": {
"title": null,
"href": null
}
}
},
"longitude": "115.1248985",
"latitude": "-33.963617",
"gathered_time": "1685662804091"
},
{
"time": "2014-11-30T02:00:00.000+10:00",
"value": {
"nil": null
},
"metadata": {
"TVPMeasurementMetadata": {
"qualifier": {
"title": null,
"href": null
}
}
},
"longitude": "115.1248985",
"latitude": "-33.963617",
"gathered_time": "1685662804091"
},
{
"time": "2014-12-10T02:00:00.000+10:00",
"value": 83.939,
"metadata": null,
"longitude": "115.1248985",
"latitude": "-33.963617",
"gathered_time": "1685662804091"
},
{
"time": "2014-12-11T02:00:00.000+10:00",
"value": 84.089,
"metadata": null,
"longitude": "115.1248985",
"latitude": "-33.963617",
"gathered_time": "1685662804091"
}
]
我想要的是只获取JSON对象中包含数值数据并且不等于{“nil”:null}...以下是预期的输出。
[
{
"time" : "2014-12-10T02:00:00.000+10:00",
"value" : 83.939,
"metadata" : null,
"longitude" : "115.1248985",
"latitude" : "-33.963617",
"gathered_time" : "1685662804091"
}, {
"time" : "2014-12-11T02:00:00.000+10:00",
"value" : 84.089,
"metadata" : null,
"longitude" : "115.1248985",
"latitude" : "-33.963617",
"gathered_time" : "1685662804091"
}
]
我尝试了几个不同的规格操作,如删除,但这些都没有得到我的任何地方。
2条答案
按热度按时间vmpqdwk31#
ffvjumwh2#
这是您的Jolt规格: