I am trying to read data from Prometheus (https://prometheus.io) into Vega Lite. Prometheus returns its data in a 2D array, like this:
[[1, 10], [3, 6], [5, 0], [9, 4], [11, 2]]
Is it possible to transform this data in Vega Lite so that it turns into this?
[
{
"time": 1,
"value": 10
},
{
"time": 3,
"value": 6,
},
...
]
I have looked at the documentation, and I can see that it's possible to flatten a 1D array, but I couldn't figure out a way to flatten a 2D array.
Thanks.
