Open smillane opened 1 year ago
Input
[ { // other data "employees": [{ // other data "hireDate": "" }] } ]
I'm trying to set hireDate to null if its "" or " ", and keep all the other data in both objects.
I've tried variations such as
{ "operation": "shift", "spec": { "*": { "*": "[&1].&", "employees": { "": null, " ": null, "*": { "@": "&" }, } } } }
but everything I do leaves the employees array empty, when I want to retain each object with the same key/values, but just set hireDate to null if its an empty string.
Input
I'm trying to set hireDate to null if its "" or " ", and keep all the other data in both objects.
I've tried variations such as
but everything I do leaves the employees array empty, when I want to retain each object with the same key/values, but just set hireDate to null if its an empty string.