Input:
{
"heart_rate": {
"value": 70,
"unit": "beats/min"
},
"effective_time_frame": {
"time_interval": {
"start_date_time": "11/01/22 22:14:21"
}
},
"descriptive-statistics": "minimum"
}
Jolt Spec:
[
{
"operation": "shift",
"spec": {
"effective_time_frame": {
"time_interval": {
"start_date_time": "effectiveDateTime"
}
},
"heart_rate": {
"value": "valueQuantity.value"
}
}
}
,
{
"operation": "modify-default-beta",
"spec": {
"effectiveDateTime": "=concat(@(day),'-',@(month),'-2022')",
"month": "=substring(@(effective_time_frame.time_interval.start_date_time),3,5)",
"day": "=substring(@(effective_time_frame.time_interval.start_date_time),4,5)"
}
}
,
{
"operation": "default",
"spec": {
"valueQuantity": {
"code": "/min",
"system": "http://unitsofmeasure.org",
"unit": "beats/minute"
}
}
}
]
Output:
{
"effectiveDateTime" : "11/01/22 22:14:21",
"valueQuantity" : {
"value" : 70,
"unit" : "beats/minute",
"code" : "/min",
"system" : "http://unitsofmeasure.org"
}
}
We have a date in the format (xxx/xx/xx/) and we want it in this format (xxxx-xx-xx) without the time. Maybe someone can help me. We need to change this as part of a project and unfortunately have no idea how Jolt transformation works.