bazaarvoice / jolt

JSON to JSON transformation library written in Java.
Apache License 2.0
1.55k stars 330 forks source link

handling null values on different key #1246

Closed mordfustang00 closed 4 months ago

mordfustang00 commented 6 months ago

Hello. Good Day. I would like to ask regards the following scenario below:

input json:

{ "CarStats": { "odo": { "value": 1000 "unit": 0 }, "VehicleStats": { "Distance": { "FuelRange": { "value": 100, "unit": 3 }, "EVRange": { "value": 200, "unit": 3 } } } }, "evstatus": null }

would like to know if the following scenario is possible:

if evstatus = null, output will be FuelRange, otherwise EVRange.

Thanks.