You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At first you go inside the values array and then, by doing: "@(2,metric.instance)" you are saying go up 2 and take wathever value there is in the metric.instance path. After that we take the element at index 0 and 1 of values.
The second spec is just for adjusting the output to be cleaner.
Please help me to transform this Json
{
"status": "success",
"data": {
"resultType": "matrix",
"result": [
{
"metric": {
"instance": "abc"
},
"values": [
[
1737087025,
"1449697924095"
],
[
1737087021,
"1449697924091"
]
]
},
{
"metric": {
"instance": "cab"
},
"values": [
[
1737087025,
"1449697924095"
],
[
1737087021,
"1449697924091"
]
]
}
]
}
}
into this output json
[ {
"instance":"abc",
"timestamp":1737087025
"value":"1449697924095"
},
{
"instance":"abc",
"timestamp":1737087021
"value":"1449697924091"
},
{
"instance":"cab",
"timestamp":1737087025
"value":"1449697924095"
},
{
"instance":"cab",
"timestamp":1737087021
"value":"1449697924091"
}
]
The text was updated successfully, but these errors were encountered: