JOLT to check the value if it is null keep it as it is else update the value based on the condition
please provide the jolt spec for
input json
[
{
“name”: “Manu”,
“age”: 26,
“location”: “New York”,
“risk”: “0”
},
{
“name”: “Manju”,
“age”: 29,
“location”: “New York city”,
“risk”: null
}
]
if risk is 0 then risk level Low if it is null then risklevel null if risk is 1 then risklevel is High
[ {
“name” : “Manu”,
“age” : 26,
“location” : “New York”,
“risklevel” : “Low”
}, {
“name” : “Manju”,
“age” : 29,
“location” : “New York city”,
“risklevel” : null
} ]