Am trying to write specs to transform a json using Jolt transformation
Input:
{
"video": "10506207",
"id": "ef3ef821-92cb-441b-b218-c10e543398e3",
"session": "a7a55e610a813c36",
"time-in": 180,
"event": "init"
}
Output
{
"video": "10506207",
"id": "ef3ef821-92cb-441b-b218-c10e543398e3",
"session": "a7a55e610a813c36",
"events":[
"event": "init",
"time-in": 180,
"time-out": 120, (= time-in - 60)
]
}
Basically trying two things: 1. Move 'time-in' and 'event' attributes to 'events' array 2. Add 'time-out' = time-in - 60
With 'default' operation I could add attributes but couldn't do mathematical operations. Thanks for any help!
ReplaceTextprocessor. - Andy