Closed mordfustang00 closed 7 months ago
With shift + "true" or "false" correspondence. Second step is to tranform a string into an integer : =toInteger calls new com.bazaarvoice.jolt.modifier.function.Objects.toInteger() method in java.
[
{
"operation": "shift",
"spec": {
"value": {
"true": {
"#1": "booleanValueAsInteger" // or value or &2
},
"false": {
"#0": "booleanValueAsInteger"
}
}
}
},
{
"operation": "modify-overwrite-beta",
"spec": {
"booleanValueAsInteger": "=toInteger"
}
}
]
many thanks :)
Good Day. Is there a way to convert boolean values to integer
My input would be:
{ "value": false or true }
My expected output should be:
{ "value": 0 or 1 }
I tried using "toInteger" code but only returns with boolean values (false, true)