Jolt Transformer v0.1.6
It might take few seconds to spin up the backend, wait for the default output :)
Input Json:
{ "alldetails": { "classid": 1, "schoolid": 3 } }
Spec:
[ { "operation": "shift", "spec": { "alldetails": { "classid": { "#Id_class": "data[0].source", "@(1,classid)": "data[0].value" }, "teacherid": { "#Id_teacher": "data[1].source", "@(1,teacherid)": "data[1].value" }, "schoolid": { "#Id_school": "data[2].source", "@(1,schoolid)": "data[2].value" } } } }, { "operation": "modify-overwrite-beta", "spec": { "*": "=recursivelySquashNulls" } } ]
Output
Output Json: