Ana içeriğe geç

Converting String Type Key Values to Numeric Data Type

Input Value

{
"kisiId": "123",
"uyeId": "456",
"adi": "xxx",
"soyadi": "yyy"
}

JOLT Transformation Code

ipucu

The =toLong expression converts string values to Long type. If the value is not a valid number, an error may occur.

[
{
"operation": "modify-overwrite-beta",
"spec": {
"kisiId": "=toLong",
"uyeId": "=toLong"
}
}
]

Output Value

{
"kisiId": 123,
"uyeId": 456,
"adi": "xxx",
"soyadi": "yyy"
}