Support Questions
Find answers, ask questions, and share your expertise

JOLT: list of json

JOLT: list of json

New Contributor

I would like to convert all array of json via JOLT to a this array of json:


input:


{ "result":[{
"metric": {
"name": "aaa",
"id": "bbb",
"age" : "12"
},
"value" : [1.312,"12"]
},{
"metric": {
"name": "ccc",
"id": "ddd",
"age" : "22"
},
"value" : [4.123,"0"]
}]
}

to output: 

 [{ 
"name": "aaa",
"id": "bbb",
"age" : "12",
"time" : 1.312,
"value" : "12"
}, {
"name": "ccc",
"id": "ddd",
"age" : "22",
"time" : 4.123,
"value" : "0"
}]