In this example, the conversion of the Id key expression and personId key expression to a numeric data type, specifically Long, is demonstrated.
Sample Original Message
{
"Id":"123",
"personId":"456",
"name":"xxx",
"surname":"yyy"
}
CODE
JOLT Code
[
{
"operation" : "modify-overwrite-beta",
"spec" : {
"Id" : "=toLong",
"personId" : "=toLong"
}
}
]
CODE
Sample Result Message
{
"Id" : 123,
"personId" : 456,
"name" : "xxx",
"surname" : "yyy"
}
CODE