3 ms·
You can write the example below in jq as def avg: add / length; group_by(.url) | map({ "url": .[0].url, "hits": length, "avg": map(.
by bonzini 5y ago
You can write the example below in jq as
def avg: add / length;
group_by(.url) | map({
"url": .[0].url,
"hits": length,
"avg": map(.response_time) | avg
})
so jq should be (at least roughly) as powerful as JSONiq.