Input JSON
{
"sId": "1000000000000000",
"lat": "12.934638",
"lon": "77.693950",
"status": "up",
"last_change": 1503452208
}
My design spec:
[
{
"operation":"shift",
"spec":{
"Id":"Id",
"status":"status",
"last_change":"last_change",
"lat":{
"@(2,lat)":{
"@(2,lat)":"geocoordinate.coordinates[0]"
}
},
"lon":{
"@(2,lon)":{
"@(2,lon)":"geocoordinate.coordinates[1].",
"#Point":"geocoordinate.type"
}
}
}
}
]
as lat long is coming as string but in output i want to have it as float. i tried conversion function but couldn't get expected result. please help me to change the lat long value into float.
Use a "modify" as your first operation to do the type conversion first, then do you shift.
Spec
Also type conversion example here http://jolt-demo.appspot.com/#modify-typeConversion