How can I transform a specific item in an array to integer? In the following example, I want only the 3rd element 456 to be converted to integer, and 123 to be left intact:
input:
{
"arr": [
"hello",
"123",
"456"
]
}
Trying this spec:
[
{
"operation": "modify-overwrite-beta",
"spec": {
"arr": "=toInteger"
}
}
]
I get actual output:
{
"arr": [
"hello",
123,
456
]
}
However, the desired output should look like this: expected output:
{
"arr": [
"hello",
"123",
456
]
}
Thank you, Gerasimos