Forum Discussion
I was putting the function at the wrong place but I was able to add the hours if I used the below string:
$Expire_Date.plusHours(4).toLocaleDateTimeString({format: "yyyy-MM-dd'T'HH:mm:ss'Z'"})
If I have the following in a JSON Generator and a subsequent Mapper, what do I put in the Expression to remove “id” field if its null? I’m getting a parsing error when trying $.id[?(value == null)].
[
{
“id”: 21,
“eId”: [
256,
2,
548,
14010
]
},
{
“id”: null,
“eId”: [
256,
2,
548,
14010
]
}
]Currently, in order to use the
[?(...)]
syntax in a JSON-Path, the previous part of the path needs to refer to an array or object. (Although I feel like your attempt makes sense and should have worked.)To delete a property from an object, you need to filter the object and test for the property name and value, like so:
$[?(key == 'id' && value == null)]