下面是我的JSON,如果目标站点名称未知,我需要Jolt来删除.需要保留物品的其余部分.
{
"destSiteName": "unknown",
"customer_code": "code1"
}
下面是我的JSON,如果目标站点名称未知,我需要Jolt来删除.需要保留物品的其余部分.
{
"destSiteName": "unknown",
"customer_code": "code1"
}
您可以使用包含两个条件的shift转换
"destSiteName"
或 not ( "*"
)或
"destSiteName"
is "unknown"
或 not ( "*"
)[
{
"operation": "shift",
"spec": {
"destSiteName": {
"unknown": "",
"*": { "@1": "&2" }
},
"*": "&"
}
}
]